From 913a663a3e383c40c644a7d0a8c8aba9d417167c Mon Sep 17 00:00:00 2001 From: dequis Date: Sat, 14 Mar 2015 09:00:58 -0300 Subject: msn: implement the rest of the http gateway support, enable by default --- protocols/msn/msn_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'protocols/msn/msn_util.c') diff --git a/protocols/msn/msn_util.c b/protocols/msn/msn_util.c index 931641ce..58bc0eae 100644 --- a/protocols/msn/msn_util.c +++ b/protocols/msn/msn_util.c @@ -173,7 +173,7 @@ void msn_buddy_ask(bee_user_t *bu) void msn_queue_feed(struct msn_data *h, char *bytes, int st) { - h->rxq = g_renew(char, h->rxq, h->rxlen + 1024); + h->rxq = g_renew(char, h->rxq, h->rxlen + st); memcpy(h->rxq + h->rxlen, bytes, st); h->rxlen += st; @@ -234,7 +234,7 @@ int msn_handler(struct msn_data *h) /* If we reached the end of the buffer, there's still an incomplete command there. Return and wait for more data. */ - if (i == h->rxlen && h->rxq[i - 1] != '\r' && h->rxq[i - 1] != '\n') { + if (i && i == h->rxlen && h->rxq[i - 1] != '\r' && h->rxq[i - 1] != '\n') { break; } } else { -- cgit v1.2.3