| 305 { |
305 { |
| 306 if (memcmp(conn->cookie, frame->cookie, 8)) |
306 if (memcmp(conn->cookie, frame->cookie, 8)) |
| 307 { |
307 { |
| 308 gaim_debug_info("oscar", "Received an incorrect cookie. " |
308 gaim_debug_info("oscar", "Received an incorrect cookie. " |
| 309 "Closing connection.\n"); |
309 "Closing connection.\n"); |
| 310 peer_connection_destroy(conn, PEER_DISCONNECT_INVALID_DATA); |
310 peer_connection_destroy(conn, OSCAR_DISCONNECT_INVALID_DATA); |
| 311 return; |
311 return; |
| 312 } |
312 } |
| 313 |
313 |
| 314 /* Remove our watchers and use the file transfer watchers in the core */ |
314 /* Remove our watchers and use the file transfer watchers in the core */ |
| 315 gaim_input_remove(conn->watcher_incoming); |
315 gaim_input_remove(conn->watcher_incoming); |
| 413 /* Tell the other person that we've received everything */ |
413 /* Tell the other person that we've received everything */ |
| 414 conn->fd = conn->xfer->fd; |
414 conn->fd = conn->xfer->fd; |
| 415 conn->xfer->fd = -1; |
415 conn->xfer->fd = -1; |
| 416 peer_oft_send_done(conn); |
416 peer_oft_send_done(conn); |
| 417 |
417 |
| 418 conn->disconnect_reason = PEER_DISCONNECT_DONE; |
418 conn->disconnect_reason = OSCAR_DISCONNECT_DONE; |
| 419 conn->sending_data_timer = gaim_timeout_add(100, |
419 conn->sending_data_timer = gaim_timeout_add(100, |
| 420 destroy_connection_when_done_sending_data, conn); |
420 destroy_connection_when_done_sending_data, conn); |
| 421 } |
421 } |
| 422 |
422 |
| 423 void |
423 void |
| 522 conn = xfer->data; |
522 conn = xfer->data; |
| 523 |
523 |
| 524 if (conn == NULL) |
524 if (conn == NULL) |
| 525 return; |
525 return; |
| 526 |
526 |
| 527 peer_connection_destroy(conn, PEER_DISCONNECT_LOCAL_CLOSED); |
527 peer_connection_destroy(conn, OSCAR_DISCONNECT_LOCAL_CLOSED); |
| 528 } |
528 } |
| 529 |
529 |
| 530 /*******************************************************************/ |
530 /*******************************************************************/ |
| 531 /* End GaimXfer callbacks for use when sending and receiving */ |
531 /* End GaimXfer callbacks for use when sending and receiving */ |
| 532 /*******************************************************************/ |
532 /*******************************************************************/ |