summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-01-26Remove <gcrypt.h> and other remnants of gcryptgcryptless-43992Simon McVittie3-3/+2
This doesn't seem to be used for anything, and creates an artificial dependency on gcrypt, which GNUTLS 3 no longer uses. Verified to pass tests on Debian's gnutls26 2.12.16-1 package, but insufficient to make tests pass on gnutls28 3.0.12-1. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=43992 Bug-Debian: http://bugs.debian.org/638420
2012-01-26Use g_getenv and g_strtoull instead of getenv and atoiSimon McVittie1-4/+4
We don't include stdlib.h (except accidentally, via gcrypt.h), which we should if we're going to use its functions. In both cases GLib has a portable version, and our coding style is generally to prefer the GLib versions of things, so let's use those.
2012-01-26Fix coding style so the tests can passSimon McVittie1-1/+1
2012-01-02Build fixes for WindowsSiraj Razick4-5/+35
These changes enables us to cross-compile wocky for windows with mingw32
2011-12-16wocky_data_form_set_type: add default value and raw contentAlban Crequy1-1/+5
They are needed for wocky_caps_hash_compute_from_lists(). https://bugs.freedesktop.org/show_bug.cgi?id=43891
2011-12-14Use G_GINT64_FORMAT instead of %liXavier Claessens1-4/+4
2011-12-14Add tests/wocky-dummy-xmpp-server.c to build system and fix itXavier Claessens3-5/+24
Code that we don't build won't build.
2011-12-14Fix build warnings with glib 2.32Xavier Claessens3-0/+11
2011-12-14g_source_get_current_time() is replaced by g_source_get_time()Xavier Claessens2-31/+23
2011-12-13test: dataforms: add a test for bug fdo#43584Alban Crequy1-0/+47
https://bugs.freedesktop.org/show_bug.cgi?id=43584
2011-12-13dataforms: fix crash in add_field_to_node_using_default()Alban Crequy1-0/+31
field->raw_value_contents was not initialized when the field was not coming from a WockyNode. It leads to a segfault in add_field_to_node_using_default(). The following code was triggering the crash: form = g_object_new (WOCKY_TYPE_DATA_FORM, NULL); wocky_data_form_set_string (form, "field", "value", TRUE); wocky_data_form_add_to_node (form, ...); This patch initializes field->raw_value_contents when the WockyNode is created through data_form_set_value(). The unit tests are updated to check this. https://bugs.freedesktop.org/show_bug.cgi?id=43584
2011-12-07wocky_data_form_set_string: fix documentationAlban Crequy1-3/+3
2011-11-29Merge branch 'invalid-character-test'Sjoerd Simons2-10/+123
2011-11-29Add a test for filtering non-character unicode codepointsSjoerd Simons1-0/+21
2011-11-29Ensure all data in a WockyNode is validated according to the rules in ↵Sjoerd Simons1-10/+102
g_utf8_validate In some cases valid utf-8, but for non-character codepoints gets send through xmpp. Other parts of the system can get confused by those (e.g. D-Bus doesn't allow them in strings). So we need to ensure that they get filtered out as soon as possible. There are two obvious places to do this, either in the XmppReader or the Nodes. Doing it in the nodes has the advantage of ensuring consistency for all data going into the Node, not just what was read from xmpp directly. Furthermore the Node api calls already copy the strings internally, which is a good place place to do the conversions if needed.
2011-11-22Support building under Android, modified from an original patch by Derek ForemanAlvaro Soliverez3-1/+41
https://bugs.freedesktop.org/show_bug.cgi?id=42509
2011-11-18Use wocky_node_matches() in a couple of placesWill Thompson3-6/+3
2011-11-18Add wocky_node_matches{,_q}Will Thompson2-0/+59
This makes it easier to verify that a node has the name and namespace you expect. Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-11-18meta-porter: emit ::sending when a child porter doesWill Thompson1-0/+17
2011-11-18Porter: add stanza being sent to ::sendingWill Thompson2-4/+6
This is useful in writing an XMPP console for Gabble.
2011-11-18Porter: support matching STANZA_TYPE_NONEWill Thompson4-24/+182
For really specialised cases, like an XML console in Gabble, you want to be able to match stanzas of any type. The docs claim you can do this, but they lie. I could be convinced that the correct way to do this is to add a fourth method, wocky_porter_register_handler_for_any_stanza (), and that the server/anyone/from variants are unnecessary. Thoughts? https://bugs.freedesktop.org/show_bug.cgi?id=38577
2011-11-16Also replace g_byte_array_free with g_byte_array_unrefXavier Claessens2-9/+9
2011-11-16Use _unref instead of _free _destroy when possible.unrefXavier Claessens12-29/+29
Replace g_(ptr_)array_free (foo, TRUE) and g_hash_table_destroy with respectively g_(ptr_)array_unref (foo) and g_hash_table_unref. I used this command to generate this patch: for f in `find -name "*.c"`; do sed -i $f -re 's/g_ptr_array_free \(([^ ,]+), TRUE\)/g_ptr_array_unref \(\1\)/'; done See Danielle's blog for explanation of possible bug _free can do: http://blogs.gnome.org/danni/2011/11/16/mistakes-with-g_value_set_boxed/
2011-11-16Add coding style check for g_hash_table_destroy and g_array_free usageXavier Claessens1-0/+13
2011-11-15sasl test: fix build failure on older libsasl2sJonny Lamb1-2/+5
A second try. Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-11-15sasl test: define sasl_callback_ft if not already done soJonny Lamb1-0/+4
We could have upped the dependency on libsasl2 but given this is just a test I thought it wasn't worth the bother of having to make sure everyone had the newer library version and blah blah blah, so I just did this. Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-11-07Accept from="server.com" as stanzas coming from serverXavier Claessens2-10/+84
Some servers does not set the full/bare jid. Fixes fdo#39057
2011-11-07Merge branch 'trivia'Danielle Madeley1-4/+2
2011-11-07wocky-muc: return NULL if a timestamp can't be determinedDanielle Madeley1-4/+2
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=42652
2011-11-07Merge branch 'wocky-muc-gdatetime'Danielle Madeley1-8/+14
2011-11-02Merge branch 'caps-forms'Jonny Lamb2-8/+37
2011-11-01tests: Fix compilation error with libsasl2Sjoerd Simons1-2/+3
wocky-test-sasl-auth-server.c: In function ‘test_sasl_auth_server_new’: wocky-test-sasl-auth-server.c:932:17: error: expected ‘)’ before ‘proc’ wocky-test-sasl-auth-server.c:932:22: error: expected ‘)’ before ‘(’ token wocky-test-sasl-auth-server.c:932:30: error: expected ‘}’ before ‘test_sasl_server_auth_log’ wocky-test-sasl-auth-server.c:933:5: error: initialization from incompatible pointer type [-Werror] wocky-test-sasl-auth-server.c:933:5: error: (near initialization for ‘callbacks[1].proc’) [-Werror] wocky-test-sasl-auth-server.c: At top level: wocky-test-sasl-auth-server.c:886:1: error: ‘test_sasl_server_auth_log’ defined but not used [-Werror=unused-function]
2011-10-18[muc] Port time_t to GDateTimeDanielle Madeley1-8/+14
2011-10-13caps-hash-test: update tests for new hashing behaviourJonny Lamb1-6/+26
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-10-13caps-hash: ignore data forms with non-hidden FORM_TYPE fieldsJonny Lamb1-0/+8
Related to: fd.o#41719 Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-10-13caps-hash: don't bail on hashing if there's no FORM_TYPEJonny Lamb1-2/+3
Fixes: fd.o#41719 Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-10-12test-resolver: don't include glib/types.h directlyCosimo Cecchi1-1/+1
Use the glib.h header instead.
2011-10-12C2SPorter: correct _enable_power_saving docsWill Thompson1-2/+6
<presence/> was being interpreted as a docbook tag; and the second bullet is no longer true: only PEP updates in particular known namespaces are considered unimportant.
2011-10-12gtk-doc: Fix out-of-tree builds with 1.17Will Thompson2-7/+7
2011-10-12gtk-doc: use no-tmpl flavour.Will Thompson1-1/+1
This stops gtk-doc even generating the legacy .tmpl files, for a marginally faster (and less crufty) documentation build process.
2011-10-12Add wocky_auth_registry_supports_one_of()Xavier Claessens2-47/+105
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-09-30NodeTree: fix _new exampleWill Thompson1-4/+2
It was legal before, but the tree it built made no sense!
2011-09-07pubsub-helpers: add node name as attribute on items nodeJonny Lamb1-1/+1
Previously I had erroneously done this: ... <items xmlns="the:node:name"> ... Where actually, it should be: ... <items node="the:node:name"> ... Bad me. Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-09-05C2SPorter: clear up English properly.Will Thompson1-6/+8
I feel threatened.
2011-09-05C2SPorter: correctly conjugate the verb "to threaten"Will Thompson1-3/+3
2011-09-01Connector: change misleading “Bad SRV record” messageWill Thompson1-2/+3
Failing to connect to the server specified by an SRV record doesn't mean the record is wrong: it could well be that the server is broken. Reviewed-by: Danielle Madeley <danielle.madeley@collabora.co.uk>
2011-08-31connector-test: use !=, not |=Will Thompson1-2/+2
Thanks, clang! Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-08-17sasl-digest-md5: the response needs both the realm and serverMarco Barisione1-3/+3
Some of the fields in the response wocky sends to the server require the realm (like the "realm" field) while others require the server name (like the "digest-uri" field). Usually this bug is not noticeable as the realm and the server name are the same. Reviewed-by: Vivek Dasmohapatra <vivek@collabora.co.uk>
2011-08-05Merge branch 'gabble-0.12'Marco Barisione1-19/+28
2011-08-05Use GQueue instead of GList* for queueable_stanza_patternSiraj Razick1-11/+6