Mercurial > pidgin.yaz
comparison src/protocols/oscar/conn.c @ 13256:7ead7b8aea63
[gaim-migrate @ 15622]
Remove the latency code because
1. It uses sleep, which would block everything if it actually worked
2. It doesn't work because we don't use AIM_TX_IMMEDIATE instead of
AIM_TX_QUEUED
3. I'm going to be getting rid of AIM_TX_IMMEDIATE and AIM_TX_QUEUED
and will be using a GaimCircBuffer for transmission at all times
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 12 Feb 2006 22:21:08 +0000 |
parents | e9802db22b06 |
children | 3128ef5250ad |
comparison
equal
deleted
inserted
replaced
13255:f280bf585fb3 | 13256:7ead7b8aea63 |
---|---|
239 conn->fd = -1; | 239 conn->fd = -1; |
240 conn->subtype = -1; | 240 conn->subtype = -1; |
241 conn->type = -1; | 241 conn->type = -1; |
242 conn->seqnum = 0; | 242 conn->seqnum = 0; |
243 conn->lastactivity = 0; | 243 conn->lastactivity = 0; |
244 conn->forcedlatency = 0; | |
245 conn->handlerlist = NULL; | 244 conn->handlerlist = NULL; |
246 | 245 |
247 sess->oscar_connections = g_list_prepend(sess->oscar_connections, conn); | 246 sess->oscar_connections = g_list_prepend(sess->oscar_connections, conn); |
248 | 247 |
249 return conn; | 248 return conn; |
357 conn->type = src->type; | 356 conn->type = src->type; |
358 conn->subtype = src->subtype; | 357 conn->subtype = src->subtype; |
359 conn->seqnum = src->seqnum; | 358 conn->seqnum = src->seqnum; |
360 conn->internal = src->internal; | 359 conn->internal = src->internal; |
361 conn->lastactivity = src->lastactivity; | 360 conn->lastactivity = src->lastactivity; |
362 conn->forcedlatency = src->forcedlatency; | |
363 conn->sessv = src->sessv; | 361 conn->sessv = src->sessv; |
364 aim_clonehandlers(sess, conn, src); | 362 aim_clonehandlers(sess, conn, src); |
365 | 363 |
366 if (src->inside) { | 364 if (src->inside) { |
367 /* | 365 /* |
402 conn->status = 0; | 400 conn->status = 0; |
403 return conn; | 401 return conn; |
404 } | 402 } |
405 | 403 |
406 /** | 404 /** |
407 * Set a forced latency value for connection. Basically causes | |
408 * @newval seconds to be spent between transmits on a connection. | |
409 * | |
410 * This is my lame attempt at overcoming not understanding the rate | |
411 * limiting. | |
412 * | |
413 * XXX: This should really be replaced with something that scales and | |
414 * backs off like the real rate limiting does. | |
415 * | |
416 * @param conn Conn to set latency for. | |
417 * @param newval Number of seconds to force between transmits. | |
418 * @return Returns -1 if the connection does not exist, zero otherwise. | |
419 */ | |
420 int | |
421 aim_conn_setlatency(OscarConnection *conn, int newval) | |
422 { | |
423 | |
424 if (!conn) | |
425 return -1; | |
426 | |
427 conn->forcedlatency = newval; | |
428 conn->lastactivity = 0; /* reset this just to make sure */ | |
429 | |
430 return 0; | |
431 } | |
432 | |
433 /** | |
434 * Determine if a connection is connecting. | 405 * Determine if a connection is connecting. |
435 * | 406 * |
436 * @param conn Connection to examine. | 407 * @param conn Connection to examine. |
437 * @return Returns nonzero if the connection is in the process of | 408 * @return Returns nonzero if the connection is in the process of |
438 * connecting (or if it just completed and | 409 * connecting (or if it just completed and |