comparison libfaim/aim_conn.c @ 283:0f14e6d8a51b

[gaim-migrate @ 293] - Good fun things here. Sometimes I think Adam does things just to make it difficult for me, I swear (j/k :) ). - I moved all the .h files into the faim/ directory because I'm tired of changing faim/aim.h to just aim.h every time Adam makes an update. - libfaim can now send messages much longer than WinAIM or TOC can. But, the length checking code is still in conversation.c, and I haven't changed it yet, mostly because I'm lazy. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 31 May 2000 03:20:11 +0000
parents 7b06ba09ffe2
children 9d258a0aa560
comparison
equal deleted inserted replaced
282:918db59d3814 283:0f14e6d8a51b
4 * 4 *
5 * Does all this gloriously nifty connection handling stuff... 5 * Does all this gloriously nifty connection handling stuff...
6 * 6 *
7 */ 7 */
8 8
9 #include <aim.h> 9 #include <faim/aim.h>
10 10
11 void aim_connrst(struct aim_session_t *sess) 11 void aim_connrst(struct aim_session_t *sess)
12 { 12 {
13 int i; 13 int i;
14 for (i = 0; i < AIM_CONN_MAX; i++) { 14 for (i = 0; i < AIM_CONN_MAX; i++) {
32 deadconn->fd = -1; 32 deadconn->fd = -1;
33 deadconn->type = -1; 33 deadconn->type = -1;
34 deadconn->seqnum = 0; 34 deadconn->seqnum = 0;
35 deadconn->lastactivity = 0; 35 deadconn->lastactivity = 0;
36 deadconn->forcedlatency = 0; 36 deadconn->forcedlatency = 0;
37 aim_clearhandlers(deadconn); 37 if (deadconn->handlerlist)
38 aim_clearhandlers(deadconn);
38 deadconn->handlerlist = NULL; 39 deadconn->handlerlist = NULL;
39 if (deadconn->priv) 40 if (deadconn->priv)
40 free(deadconn->priv); 41 free(deadconn->priv);
41 deadconn->priv = NULL; 42 deadconn->priv = NULL;
42 faim_mutex_init(&deadconn->active, NULL); 43 faim_mutex_init(&deadconn->active, NULL);
236 sess->logininfo.BOSIP = NULL; 237 sess->logininfo.BOSIP = NULL;
237 memset(sess->logininfo.cookie, 0x00, AIM_COOKIELEN); 238 memset(sess->logininfo.cookie, 0x00, AIM_COOKIELEN);
238 sess->logininfo.email = NULL; 239 sess->logininfo.email = NULL;
239 sess->logininfo.regstatus = 0x00; 240 sess->logininfo.regstatus = 0x00;
240 241
242 memset(sess->conns, 0, sizeof(struct aim_conn_t)*AIM_CONN_MAX);
241 aim_connrst(sess); 243 aim_connrst(sess);
242 244
243 sess->queue_outgoing = NULL; 245 sess->queue_outgoing = NULL;
244 sess->queue_incoming = NULL; 246 sess->queue_incoming = NULL;
245 sess->pendingjoin = NULL; 247 sess->pendingjoin = NULL;