Changeset b8a491d
- Timestamp:
- 2010-03-18T00:30:38Z (15 years ago)
- Branches:
- master
- Children:
- 699376f7
- Parents:
- 78d254f1
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/s5bytestream.c
r78d254f1 rb8a491d 830 830 char *sid; 831 831 GSList *tflist; 832 struct jabber_transfer *tf ;832 struct jabber_transfer *tf = NULL; 833 833 struct xt_node *query; 834 834 struct jabber_data *jd = ic->proto_data; -
protocols/jabber/si.c
r78d254f1 rb8a491d 41 41 if( tf->fd != -1 ) 42 42 { 43 disconnect( tf->fd );43 closesocket( tf->fd ); 44 44 tf->fd = -1; 45 45 } … … 156 156 if( bud == NULL ) 157 157 { 158 imcb_file_canceled( tf->ft, "Couldn't find buddy (BUG?)" );158 imcb_file_canceled( ft, "Couldn't find buddy (BUG?)" ); 159 159 return; 160 160 } 161 161 162 162 imcb_log( ic, "Trying to send %s(%zd bytes) to %s", ft->file_name, ft->file_size, who ); 163 163 … … 232 232 !( name = xt_find_attr( d, "name" ) ) || 233 233 !( size_s = xt_find_attr( d, "size" ) ) || 234 !( 1 == sscanf( size_s, "% lld", &size )) ||234 !( 1 == sscanf( size_s, "%zd", &size ) ) || 235 235 !( d = xt_find_node( sinode->children, "feature" ) ) || 236 236 !( strcmp( xt_find_attr( d, "xmlns" ), XMLNS_FEATURE ) == 0 ) || … … 242 242 { 243 243 imcb_log( ic, "WARNING: Received incomplete Stream Initiation request" ); 244 } else 244 } 245 else 245 246 { 246 247 /* Check if we support one of the options */ … … 248 249 c = d->children; 249 250 while( ( c = xt_find_node( c, "option" ) ) ) 250 if( 251 251 if( ( d = xt_find_node( c->children, "value" ) ) && 252 ( strcmp( d->text, XMLNS_BYTESTREAMS ) == 0 ) ) 252 253 { 253 254 requestok = TRUE; … … 259 260 } 260 261 261 if 262 if( requestok ) 262 263 { 263 264 /* Figure out who the transfer should come frome... */ 264 265 266 ext_jid = ini_jid; 265 267 if( ( s = strchr( ini_jid, '/' ) ) ) 266 268 { … … 282 284 *s = '/'; 283 285 } 284 285 if ( !requestok ) 286 else 286 287 { 287 288 reply = jabber_make_error_packet( node, "item-not-found", "cancel", NULL ); -
root_commands.c
r78d254f1 rb8a491d 1128 1128 } 1129 1129 1130 static void cmd_transfer s( irc_t *irc, char **cmd )1130 static void cmd_transfer( irc_t *irc, char **cmd ) 1131 1131 { 1132 1132 GSList *files = irc->file_transfers; … … 1141 1141 } 1142 1142 1143 if( cmd[1] && 1144 ( strcmp( cmd[1], "reject" ) == 0 ) ) 1143 if( cmd[1] && ( strcmp( cmd[1], "reject" ) == 0 ) ) 1145 1144 { 1146 1145 subcmd = REJECT; 1147 1146 } 1148 else if( cmd[1] && 1149 ( strcmp( cmd[1], "cancel" ) == 0 ) && 1150 cmd[2] && 1151 ( fid = atoi( cmd[2] ) ) ) 1147 else if( cmd[1] && ( strcmp( cmd[1], "cancel" ) == 0 ) && 1148 cmd[2] && ( sscanf( cmd[2], "%d", &fid ) == 1 ) ) 1152 1149 { 1153 1150 subcmd = CANCEL; … … 1214 1211 { "join_chat", 2, cmd_join_chat, 0 }, 1215 1212 { "chat", 1, cmd_chat, 0 }, 1216 { "transfer s", 0, cmd_transfers,0 },1213 { "transfer", 0, cmd_transfer, 0 }, 1217 1214 { NULL } 1218 1215 };
Note: See TracChangeset
for help on using the changeset viewer.