summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-02-23If configured with --enable-shared-suffix=*, install a shared libraryHEADmasterSimon McVittie2-0/+19
The suffix should be something like gabble-0.15.4, to yield libwocky-gabble-0.15.4.so ("the Wocky from Gabble 0.15.4").
2012-02-23Use LIBADD properly, rather than putting libraries in LDFLAGSSimon McVittie1-2/+9
2012-02-21GNUTLS backend: don't use 0 as an error domainSimon McVittie4-34/+58
It's never been considered valid, and since GLib 2.31.something it issues a warning, which breaks the Gabble regression tests. We're still using 0 as the error code because WockyTLSError has apparently never actually defined what its error enum is, and in its existing uses in the OpenSSL backend it's an OpenSSL error code, which is obviously not applicable here. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46379 Reviewed-by: Vivek Dasmohapatra <vivek@collabora.co.uk>
2012-02-06Namespace debug flags.Will Thompson38-89/+89
For better or worse, we expose these to applications, so we should namespace them. (This isn't purely theoretical: the names clash with the same ones in Gibber within Salut.)
2012-02-06Merge branch 'headers'Will Thompson137-271/+535
https://bugs.freedesktop.org/show_bug.cgi?id=27489 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-02-06Move some of pubsub-node-protected.h to internal.hWill Thompson5-19/+48
As Simon mentions on <https://bugs.freedesktop.org/show_bug.cgi?id=27489#c1> and comments in that file specify, some bits of wocky-pubsub-node-protected.h are intended for applications, and other bits are internal to Wocky. So let's split the later bits into a new header, wocky-pubsub-node-internal.h, which is not included by wocky.h and has internal-only header guards.
2012-02-06Include wocky-debug.h from wocky.hWill Thompson2-2/+3
2012-02-06Always define WockyDebugFlags and wocky_debug_set_flags()Will Thompson2-8/+6
If wocky-debug.h is to contain API for applications, that API should probably always be defined.
2012-02-06Move most of debug.h to debug-internal.hWill Thompson40-101/+124
Gabble uses a couple of bits of this API to turn on a little bit of Wocky's debug output for the purposes of the D-Bus debugging interface, so making debug.h internal-only is not going to fly. However, most of it really is internal-only.
2012-02-06Make #include <wocky/wocky.h> the only legal import.Will Thompson94-110/+268
2012-02-06Include foo-enumtypes.h from each foo.hWill Thompson19-12/+10
I think it's reasonable to assume that importing the header which gives you WockyXmppError should also give you WOCKY_TYPE_XMPP_ERROR.
2012-02-06AuthHandler: add a bit of documentation.Will Thompson2-9/+69
2012-02-06Remove prototype for wocky_auth_handler_free()Will Thompson1-3/+0
This function doesn't exist.
2012-02-06docs: use @... not @VarargsWill Thompson5-9/+9
Apparently the latter stopped being recognized by gtk-doc at some point. :(
2012-02-01Merge remote-tracking branch 'siraj/mingw32-warn'Jonny Lamb2-9/+10
2012-02-01test-helper: give sched_close_cb a more debuggable assertionWill Thompson1-2/+6
Asserting that wocky_porter_close_finish() returns TRUE is fine and all, but when it fails you get no information about why it failed. By passing a non-NULL GError ** parameter and asserting on that error first, we get the details of what actually happened immediately.
2012-02-01porter-test: fix /handler-stanzaWill Thompson1-1/+2
test_close_porter() assumes test->sched_in has not been started, and calls wocky_xmpp_connection_recv_stanza_async() on test->in; the callback assumes that the call has failed with an error indicating that the stream has been closed. This would be fine if the test was sure there were no stanzas in the queue in test->in, but since my change to make WockyC2SPorter send back an error in response to unhandled IQs, this assumption is no longer true: there are error replies sitting around waiting to be handled. So this patch just makes this test turn both porters on and then use test_close_both_porters().
2012-01-31C2SPorter: reply to unhandled IQ get/sets.Will Thompson2-5/+79
XMPP Core requires that we reply to all IQs we receive. If no handler claims responsibility for an incoming IQ, the porter should send back a <service-unavailable/> error. (Currently, Gabble does this.) https://bugs.freedesktop.org/show_bug.cgi?id=34975
2012-01-31Merge branch '45400-pep-service-rummage-for-items'Will Thompson3-24/+94
2012-01-31Remove <gcrypt.h> and other remnants of gcryptSimon 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. Reviewed-by: Will Thompson <will.thompson@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=43992 Bug-Debian: http://bugs.debian.org/638420
2012-01-31Use 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. Reviewed-by: Will Thompson <will.thompson@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=43992
2012-01-30PepService: update © years.Will Thompson2-2/+2
2012-01-30PepService::changed: pass <item> element to callbackWill Thompson2-16/+60
2012-01-30PepService: return <item> node from get()Will Thompson3-3/+29
2012-01-30PepService: use G_GNUC_WARN_UNUSED_RESULT as needed.Will Thompson1-3/+3
2012-01-26Fix warnings from wocky-connector-test.c under mingw32Siraj Razick1-2/+3
In windows socket API setsockopt takes a const char * as the fourth parameter, while on Linux it takes a void * so we cast to const char * which will work under both the platforms. This patch also move flags veriable in client_connected to the unix part of the ifdef, to remove warnings which shows up with mingw32.
2012-01-26TLS: replace gsize and gssize with size_t and ssize_tSiraj Razick1-4/+4
gnutls_transport_set_push_function expects a function of ssize_t (*gnutls_push_func)(gnutls_transport_ptr_t, const void*, size_t); and in mingw32 gsize and gssize doesn't expend to size_t or ssize_t. this results in mingw32 builds fail due to the warning. https://bugs.freedesktop.org/show_bug.cgi?id=45272
2012-01-26TLS: Rename _stat variable to peer_cert_statusSiraj Razick1-3/+3
_stat shadows a global variable defined in mingw32 so this patch renames it to peer_cert_status in wocky_tls_session_verify_peer https://bugs.freedesktop.org/show_bug.cgi?id=45272
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