diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2006-09-21 11:37:03 +0200 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2006-09-21 11:37:03 +0200 |
commit | 4a0614e65b45364d4d1f631aeaae047a92c752c5 (patch) | |
tree | 5c40d52c08eaba7b26c2d9567babf4ea45770190 /protocols/jabber/jabber.c | |
parent | dd788bb0b18684be993cc7edf1f0da6f8e36449d (diff) |
Added simple parsing of incoming <presence> tags, a nice </stream:stream>
at the end of sessions, support for sending messages, and restored the old
(and leaking) xt_print(), which I'll only use for debugging.
Diffstat (limited to 'protocols/jabber/jabber.c')
-rw-r--r-- | protocols/jabber/jabber.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c index 84d7e366..132a355c 100644 --- a/protocols/jabber/jabber.c +++ b/protocols/jabber/jabber.c @@ -90,6 +90,8 @@ static void jabber_close( struct gaim_connection *gc ) { struct jabber_data *jd = gc->proto_data; + jabber_end_stream( gc ); + if( jd->r_inpa >= 0 ) b_event_remove( jd->r_inpa ); if( jd->w_inpa >= 0 ) @@ -108,7 +110,15 @@ static void jabber_close( struct gaim_connection *gc ) static int jabber_send_im( struct gaim_connection *gc, char *who, char *message, int len, int away ) { - return 0; + struct xt_node *node; + int st; + + node = xt_new_node( "body", message, NULL ); + node = jabber_make_packet( "message", "chat", who, node ); + st = jabber_write_packet( gc, node ); + xt_free_node( node ); + + return st; } static GList *jabber_away_states( struct gaim_connection *gc ) |