Changeset 788a1af for protocols/jabber/presence.c
- Timestamp:
- 2006-10-15T20:24:01Z (18 years ago)
- Branches:
- master
- Children:
- d74c644
- Parents:
- e617b35
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/presence.c
re617b35 r788a1af 31 31 struct xt_node *c; 32 32 struct jabber_buddy *bud; 33 char *s; 33 34 34 35 if( !from ) … … 37 38 if( type == NULL ) 38 39 { 39 if( strchr( from, '/') == NULL )40 if( ( s = strchr( from, '/' ) ) == NULL ) 40 41 { 41 42 char *s = xt_to_string( node ); 42 serv_got_crap( gc, "WARNING: Ignoring presence tag with bare JID: %s \n", s );43 serv_got_crap( gc, "WARNING: Ignoring presence tag with bare JID: %s", s ); 43 44 g_free( s ); 44 45 return XT_HANDLED; … … 47 48 if( !( bud = jabber_buddy_by_jid( gc, from ) ) ) 48 49 { 50 /* FOR NOW, s still contains the location of the /. 51 Keep this in mind when changing things here. :-) */ 52 53 /* We check if the buddy is in the contact list, 54 because Jabber servers seem to like to send 55 presence information of buddies we removed 56 from our list sometimes, for example... */ 57 58 *s = 0; 59 if( find_buddy( gc, from ) == NULL ) 60 { 61 *s = '/'; 62 serv_got_crap( gc, "WARNING: Ignoring presence information from unknown JID: %s", from ); 63 return XT_HANDLED; 64 } 65 *s = '/'; 66 49 67 bud = jabber_buddy_add( gc, from ); 50 68 } … … 83 101 serv_got_crap( gc, "WARNING: Ignoring presence tag with bare JID: %s\n", s ); 84 102 g_free( s ); 103 return XT_HANDLED; 104 } 105 106 if( jabber_buddy_by_jid( gc, from ) == NULL ) 107 { 108 serv_got_crap( gc, "WARNING: Received presence information from unknown JID: %s", from ); 85 109 return XT_HANDLED; 86 110 }
Note: See TracChangeset
for help on using the changeset viewer.