src/protocols/irc/irc.c

changeset 4552
ae21ed2da9fb
parent 4514
40e3588a280f
child 4594
a96954344300
equal deleted inserted replaced
4551:b7dde2b75007 4552:ae21ed2da9fb
1261 { 1261 {
1262 guint32 pos; 1262 guint32 pos;
1263 1263
1264 pos = htonl(gaim_xfer_get_bytes_sent(xfer)); 1264 pos = htonl(gaim_xfer_get_bytes_sent(xfer));
1265 1265
1266 gaim_xfer_write(xfer, (char *)&pos, 4); 1266 write(xfer->fd, (char *)&pos, 4);
1267 } 1267 }
1268 1268
1269 static void 1269 static void
1270 handle_ctcp(struct gaim_connection *gc, char *to, char *nick, 1270 handle_ctcp(struct gaim_connection *gc, char *to, char *nick,
1271 char *msg, char *word[], char *word_eol[]) 1271 char *msg, char *word[], char *word_eol[])
1362 /* Keep track of this transfer for later. */ 1362 /* Keep track of this transfer for later. */
1363 id->file_transfers = g_slist_append(id->file_transfers, xfer); 1363 id->file_transfers = g_slist_append(id->file_transfers, xfer);
1364 1364
1365 /* Now perform the request! */ 1365 /* Now perform the request! */
1366 gaim_xfer_request(xfer); 1366 gaim_xfer_request(xfer);
1367
1368 #if 0
1369 if (xfer != NULL) {
1370 struct irc_file_transfer *ift;
1371 gaim_xfer_set_read_fnc(xfer, irc_xfer_read);
1372 gaim_xfer_set_cancel_fnc(xfer, irc_xfer_cancel);
1373
1374 gaim_xfer_set_ack_fnc(xfer, irc_xfer_ack);
1375
1376 ift = g_new0(struct irc_file_transfer, 1);
1377
1378 strncpy(ift->ip, send_args[3], sizeof(ift->ip));
1379 ift->type = IFT_SENDFILE_IN;
1380 ift->sn = g_strdup(nick);
1381 ift->gc = gc;
1382 ift->port = atoi(send_args[4]);
1383 ift->len = atoi(send_args[5]);
1384 ift->name = g_strdup(send_args[2]);
1385 ift->cur = 0;
1386 ift->xfer = xfer;
1387
1388 xfer->data = ift;
1389
1390
1391 gaim_xfer_start(xfer, -1, send_args[3], atoi(send_args[4]));
1392 }
1393 #endif
1394 } 1367 }
1395 1368
1396 /*write_to_conv(c, out, WFLAG_SYSTEM, NULL, time(NULL), -1);*/ 1369 /*write_to_conv(c, out, WFLAG_SYSTEM, NULL, time(NULL), -1);*/
1397 } 1370 }
1398 1371

mercurial