# HG changeset patch # User Mark Huetsch # Date 1168501383 0 # Node ID a92c64f06995e21361fe0a62bca6bc3fb9f1ab19 # Parent 28051164843c131f3f082681940cfdaaf5940379 [gaim-migrate @ 18107] Have a little more patience for non-acked packets and then quietly drop them. Temporary solution. committer: Tailor Script diff -r 28051164843c -r a92c64f06995 libgaim/protocols/qq/sendqueue.c --- a/libgaim/protocols/qq/sendqueue.c Thu Jan 11 07:42:51 2007 +0000 +++ b/libgaim/protocols/qq/sendqueue.c Thu Jan 11 07:43:03 2007 +0000 @@ -33,7 +33,7 @@ #include "qq_proxy.h" #include "sendqueue.h" -#define QQ_RESEND_MAX 5 /* max resend per packet */ +#define QQ_RESEND_MAX 8 /* max resend per packet */ typedef struct _gc_and_packet gc_and_packet; @@ -78,8 +78,9 @@ gaim_debug(GAIM_DEBUG_INFO, "QQ", "%d packets in sendqueue are freed!\n", i); } -/* TODO drop get buddy list if we don't know about any buddies... - * I think the server won't ACK a get buddies request if we have none */ +/* FIXME We shouldn't be dropping packets, but for now we have to because + * somewhere we're generating invalid packets that the server won't ack. + * Given enough time, a buildup of those packets would crash the client. */ gboolean qq_sendqueue_timeout_callback(gpointer data) { GaimConnection *gc; @@ -131,10 +132,10 @@ break; default:{ gaim_debug(GAIM_DEBUG_WARNING, "QQ", - "%s packet sent %d times but not acked. Resetting sendqueue life\n", + "%s packet sent %d times but not acked. Not resending it.\n", qq_get_cmd_desc(p->cmd), QQ_RESEND_MAX); } - p->resend_times = 0; + p->resend_times = -1; } } else { /* resend_times < QQ_RESEND_MAX, so sent it again */ wait_time = (gint) (QQ_SENDQUEUE_TIMEOUT / 1000);