Changeset dce3903 for protocols/jabber/si.c
- Timestamp:
- 2007-12-04T00:48:57Z (16 years ago)
- Branches:
- master
- Children:
- 8076ec0, fa30fa5
- Parents:
- 2ff2076
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/si.c
r2ff2076 rdce3903 84 84 struct jabber_data *jd = ic->proto_data; 85 85 86 imcb_log( ic, " Incoming file from %s : %s %zd bytes", ic->irc->nick, ft->file_name, ft->file_size);86 imcb_log( ic, "Trying to send %s(%zd bytes) to %s", ft->file_name, ft->file_size, who ); 87 87 88 88 tf = g_new0( struct jabber_transfer, 1 ); … … 224 224 225 225 /* 226 * imc bcalled the accept callback which probably means that the user accepted this file transfer.226 * imc called the accept callback which probably means that the user accepted this file transfer. 227 227 * We send our response to the initiator. 228 228 * In the next step, the initiator will send us a request for the given stream type. … … 275 275 { 276 276 struct xt_node *c, *d; 277 char *ini_jid, *tgt_jid ;277 char *ini_jid, *tgt_jid, *iq_id; 278 278 GSList *tflist; 279 279 struct jabber_transfer *tf=NULL; 280 280 struct jabber_data *jd = ic->proto_data; 281 char *sid;282 281 283 282 if( !( tgt_jid = xt_find_attr( node, "from" ) ) || … … 288 287 } 289 288 290 imcb_log( ic, "GOT RESPONSE TO FILE" );291 289 /* All this means we expect something like this: ( I think ) 292 * <iq from=... to=... >290 * <iq from=... to=... id=...> 293 291 * <si xmlns=si> 294 * <file xmlns=ft/>292 * [ <file xmlns=ft/> ] <-- not neccessary 295 293 * <feature xmlns=feature> 296 294 * <x xmlns=xdata type=submit> … … 300 298 if( !( tgt_jid = xt_find_attr( node, "from" ) ) || 301 299 !( ini_jid = xt_find_attr( node, "to" ) ) || 300 !( iq_id = xt_find_attr( node, "id" ) ) || 302 301 !( c = xt_find_node( node->children, "si" ) ) || 303 302 !( strcmp( xt_find_attr( c, "xmlns" ), XMLNS_SI ) == 0 ) || 304 !( sid = xt_find_attr( c, "id" ) )|| 305 !( d = xt_find_node( c->children, "file" ) ) || 306 !( strcmp( xt_find_attr( d, "xmlns" ), XMLNS_FILETRANSFER ) == 0 ) || 303 /* !( d = xt_find_node( c->children, "file" ) ) || 304 !( strcmp( xt_find_attr( d, "xmlns" ), XMLNS_FILETRANSFER ) == 0 ) || */ 307 305 !( d = xt_find_node( c->children, "feature" ) ) || 308 306 !( strcmp( xt_find_attr( d, "xmlns" ), XMLNS_FEATURE ) == 0 ) || … … 331 329 { 332 330 struct jabber_transfer *tft = tflist->data; 333 if( ( strcmp( tft-> sid, sid ) == 0 ) )331 if( ( strcmp( tft->iq_id, iq_id ) == 0 ) ) 334 332 { 335 333 tf = tft; … … 346 344 tf->ini_jid = g_strdup( ini_jid ); 347 345 tf->tgt_jid = g_strdup( tgt_jid ); 346 347 imcb_log( ic, "File %s: %s accepted the transfer!", tf->ft->file_name, tgt_jid ); 348 348 349 349 jabber_bs_send_start( tf ); … … 423 423 node = jabber_make_packet( "iq", "set", bud ? bud->full_jid : who, sinode ); 424 424 jabber_cache_add( ic, node, jabber_si_handle_response ); 425 tf->iq_id = g_strdup( xt_find_attr( node, "id" ) ); 425 426 426 427 return jabber_write_packet( ic, node );
Note: See TracChangeset
for help on using the changeset viewer.