Changeset 259edd4 for protocols/jabber/iq.c
- Timestamp:
- 2006-10-12T17:48:58Z (18 years ago)
- Branches:
- master
- Children:
- a4effbf
- Parents:
- b56b220
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/iq.c
rb56b220 r259edd4 30 30 struct xt_node *c, *reply = NULL; 31 31 char *type, *s; 32 int st ;32 int st, pack = 1; 33 33 34 34 type = xt_find_attr( node, "type" ); … … 101 101 { 102 102 xt_free_node( reply ); 103 reply = NULL; 104 } 105 106 /* If we recognized the xmlns and managed to generate a reply, 107 finish and send it. */ 108 if( reply ) 103 reply = jabber_make_error_packet( node, "feature-not-implemented", "cancel" ); 104 pack = 0; 105 } 106 } 107 else if( strcmp( type, "set" ) == 0 ) 108 { 109 xt_free_node( reply ); 110 reply = jabber_make_error_packet( node, "feature-not-implemented", "cancel" ); 111 pack = 0; 112 } 113 114 /* If we recognized the xmlns and managed to generate a reply, 115 finish and send it. */ 116 if( reply ) 117 { 118 /* Normally we still have to pack it into an iq-result 119 packet, but for errors, for example, we don't. */ 120 if( pack ) 109 121 { 110 122 reply = jabber_make_packet( "iq", "result", xt_find_attr( node, "from" ), reply ); 111 123 if( ( s = xt_find_attr( node, "id" ) ) ) 112 124 xt_add_attr( reply, "id", s ); 113 114 st = jabber_write_packet( gc, reply );115 xt_free_node(reply );116 if( !st )117 return XT_ABORT;118 }125 } 126 127 st = jabber_write_packet( gc, reply ); 128 xt_free_node( reply ); 129 if( !st ) 130 return XT_ABORT; 119 131 } 120 132
Note: See TracChangeset
for help on using the changeset viewer.