Be more explicit when queueing.
Signed-off-by: Jan Vidar Krey <janvidar@extatic.org>
This commit is contained in:
parent
58e2982675
commit
e74d2be318
|
@ -68,16 +68,12 @@ static void queue_command(struct user* user, struct adc_message* msg__, int offs
|
||||||
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);
|
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
|
#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->send_queue_offset = offset;
|
||||||
user->tm_last_write = time(NULL);
|
user->tm_last_write = time(NULL);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
user->send_queue_size += msg->length;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// #define ALWAYS_QUEUE_MESSAGES
|
// #define ALWAYS_QUEUE_MESSAGES
|
||||||
|
|
Loading…
Reference in New Issue