Hello, I've been working on a trivial example program that signs in and sends a single message to a contact. Here is the branch: http://git.collabora.co.uk/?p=user/wjt/wocky.git;a=shortlog;h=refs/heads/message-example Here is the actual code: http://git.collabora.co.uk/?p=user/wjt/wocky.git;a=blob;f=examples/message.c;h=82be292a617adef14f5df034d8ea7e9d84049627;hb=0dd3a10f6dbfa6f580eed5ae0f492eaaac2e540f However! wocky_porter_close_async() always fails as follows: 2008 % ./examples/wocky-message t-pain@test.collabora.co.uk XXXXXX will.thompson@collabora.co.uk "very thin ice" Sent 'very thin ice' to will.thompson@collabora.co.uk ** (process:11990): WARNING **: Couldn't sign out: Another send operation is pending I can't see anything I'm obviously doing wrong in the example… I'd rather hope I knew how to drive Wocky by now, but I have been wrong on many occasions in the past.
I fixed the bug wjt was hitting: http://cgit.freedesktop.org/~jonny/wocky/log?h=message-example
I endorse Jonny's patch. I've stolen it, and rebased my branch with the test case and example onto it. Also, I've added an example of receiving incoming messages, and deleted the connector examples, and fixed a few cosmetic issues I stumbled upon. See the branch!
+ g_print ("%s\n", G_STRFUNC); o rly Neither of your tests call wocky_deinit(). + '@', "show", "chat", Not chatty? :-( Other than that it's fine.
(In reply to comment #3) > + g_print ("%s\n", G_STRFUNC); > > o rly Whoops. > Neither of your tests call wocky_deinit(). I assume you mean examples? (The tests do call it, so they can be valground.) I don't think real applications generally should feel the need to call wocky_deinit(): /** * wocky_deinit: * * Clean up any resources created by Wocky in wocky_init(). * * It is normally not needed to call this function in a normal application * as the resources will automatically be freed when the program terminates. * This function is therefore mostly used by testsuites and other memory * profiling tools. But I'm prepared to be told they should? > + '@', "show", "chat", > > Not chatty? :-( http://xmpp.org/rfcs/rfc3921.html#stanzas-presence-children-show
(In reply to comment #4) > I assume you mean examples? (The tests do call it, so they can be valground.) I > don't think real applications generally should feel the need to call > wocky_deinit(): OK. > http://xmpp.org/rfcs/rfc3921.html#stanzas-presence-children-show :-(
(In reply to comment #5) > > http://xmpp.org/rfcs/rfc3921.html#stanzas-presence-children-show > > :-( hah, despite linking to le rfc i still got it wrong. refresh for a new patch verified to work with the unique power of telepathy-inspector
<show>longcat</show gogogogogo merge
It is done.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.