mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 02:53:02 +01:00
couple small fixes
This commit is contained in:
parent
bcf4a5af90
commit
21f8e7f398
@ -109,8 +109,9 @@ void cqueue_remove(ToxWindow *self, struct chat_queue *q, uint32_t receipt)
|
|||||||
free(msg);
|
free(msg);
|
||||||
q->root = next;
|
q->root = next;
|
||||||
} else {
|
} else {
|
||||||
msg->prev->next = next;
|
struct cqueue_msg *prev = msg->prev;
|
||||||
free(msg);
|
free(msg);
|
||||||
|
prev->next = next;
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -41,9 +41,8 @@ struct chat_queue {
|
|||||||
void cqueue_cleanup(struct chat_queue *q);
|
void cqueue_cleanup(struct chat_queue *q);
|
||||||
void cqueue_add(struct chat_queue *q, const char *msg, int len, uint8_t type, uint32_t line_id);
|
void cqueue_add(struct chat_queue *q, const char *msg, int len, uint8_t type, uint32_t line_id);
|
||||||
|
|
||||||
/* Tries to send oldest message in queue. If fails, tries again in CQUEUE_TRY_SEND_INTERVAL seconds */
|
/* Tries to send the oldest unsent message in queue. */
|
||||||
void cqueue_try_send(ToxWindow *self, Tox *m, int32_t friendnum);
|
void cqueue_try_send(ToxWindow *self, Tox *m, int32_t friendnum);
|
||||||
|
|
||||||
/* removes root from queue and updates line to show the message was received.
|
/* removes message with matching receipt from queue and updates line to show the message was received. */
|
||||||
receipt should always be equal to queue root's receipt */
|
|
||||||
void cqueue_remove(ToxWindow *self, struct chat_queue *q, uint32_t receipt);
|
void cqueue_remove(ToxWindow *self, struct chat_queue *q, uint32_t receipt);
|
||||||
|
Loading…
Reference in New Issue
Block a user