Be more explicit when queueing.

Signed-off-by: Jan Vidar Krey <janvidar@extatic.org>
This commit is contained in:
Jan Vidar Krey 2009-03-16 12:33:10 +01:00
parent 58e2982675
commit e74d2be318

View File

@ -67,17 +67,13 @@ static void queue_command(struct user* user, struct adc_message* msg__, int offs
#ifdef DEBUG_SENDQ
hub_log(log_trace, "SENDQ: user=%p, msg=%p (%zu), offset=%d, length=%d, total_length=%d", user, msg, msg->references, offset, msg->length, user->send_queue_size);
#endif
if (offset > 0)
user->send_queue_size += msg->length - offset;
if (list_size(user->send_queue) == 1)
{
user->send_queue_size += msg->length - offset;
user->send_queue_offset = offset;
user->tm_last_write = time(NULL);
}
else
{
user->send_queue_size += msg->length;
}
}
// #define ALWAYS_QUEUE_MESSAGES