| 1 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
1 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
| 2 |
2 |
| 3 /* |
3 /* |
| |
4 * $Id: tcpfilehandle.c 1987 2001-06-09 14:46:51Z warmenhoven $ |
| |
5 * |
| 4 * Copyright (C) 1998-2001, Denis V. Dmitrienko <denis@null.net> and |
6 * Copyright (C) 1998-2001, Denis V. Dmitrienko <denis@null.net> and |
| 5 * Bill Soudan <soudan@kde.org> |
7 * Bill Soudan <soudan@kde.org> |
| 6 * |
8 * |
| 7 * This program is free software; you can redistribute it and/or modify |
9 * This program is free software; you can redistribute it and/or modify |
| 8 * it under the terms of the GNU General Public License as published by |
10 * it under the terms of the GNU General Public License as published by |
| 219 { |
221 { |
| 220 icq_TCPLink *pfilelink; |
222 icq_TCPLink *pfilelink; |
| 221 icq_FileSession *pfile; |
223 icq_FileSession *pfile; |
| 222 icq_Packet *p2; |
224 icq_Packet *p2; |
| 223 |
225 |
| 224 invoke_callback(plink->icqlink, icq_RequestNotify)(plink->icqlink, |
|
| 225 p->id, ICQ_NOTIFY_ACK, 0, NULL); |
|
| 226 |
|
| 227 pfilelink=icq_TCPLinkNew(plink->icqlink); |
226 pfilelink=icq_TCPLinkNew(plink->icqlink); |
| 228 pfilelink->type=TCP_LINK_FILE; |
227 pfilelink->type=TCP_LINK_FILE; |
| 229 pfilelink->id=p->id; |
228 pfilelink->id=p->id; |
| 230 |
229 |
| 231 /* once the ack packet has been processed, link up with the file session */ |
230 /* once the ack packet has been processed, link up with the file session */ |
| 234 pfile->tcplink=pfilelink; |
233 pfile->tcplink=pfilelink; |
| 235 pfilelink->id=pfile->id; |
234 pfilelink->id=pfile->id; |
| 236 |
235 |
| 237 invoke_callback(plink->icqlink, icq_RequestNotify)(plink->icqlink, |
236 invoke_callback(plink->icqlink, icq_RequestNotify)(plink->icqlink, |
| 238 pfile->id, ICQ_NOTIFY_FILESESSION, sizeof(icq_FileSession), pfile); |
237 pfile->id, ICQ_NOTIFY_FILESESSION, sizeof(icq_FileSession), pfile); |
| 239 invoke_callback(plink->icqlink, icq_RequestNotify)(plink->icqlink, |
|
| 240 pfile->id, ICQ_NOTIFY_SUCCESS, 0, NULL); |
|
| 241 |
238 |
| 242 icq_FileSessionSetStatus(pfile, FILE_STATUS_CONNECTING); |
239 icq_FileSessionSetStatus(pfile, FILE_STATUS_CONNECTING); |
| 243 icq_TCPLinkConnect(pfilelink, plink->remote_uin, port); |
240 icq_TCPLinkConnect(pfilelink, plink->remote_uin, port); |
| 244 |
241 |
| 245 pfilelink->session=pfile; |
242 pfilelink->session=pfile; |