From e582eafca3304cc1da1f2df162df56c091493784 Mon Sep 17 00:00:00 2001 From: Thadeu Lima de Souza Cascardo Date: Fri, 30 Jan 2009 21:37:53 -0200 Subject: [PATCH] Fix bug with uninitialized variable. This was making the chat code consider the message be considered as sent even when it was received, with the possible result of losing messages. --- chat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chat.c b/chat.c index 9cfe397..dfa83eb 100644 --- a/chat.c +++ b/chat.c @@ -43,7 +43,7 @@ hc_xmpp_chat (hc_xmpp_t *xmpp, iks *message) char *from; char *to; char *body; - int sent; + int sent = 0; str = iks_string (iks_stack (message), message); write (fd, str, strlen (str)); from = iks_find_attrib (message, "from"); -- 2.20.1