From: Thadeu Lima de Souza Cascardo Date: Fri, 30 Jan 2009 23:37:53 +0000 (-0200) Subject: Fix bug with uninitialized variable. X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fchat.git;a=commitdiff_plain;h=e582eafca3304cc1da1f2df162df56c091493784 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. --- 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");