aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/msn/msn_util.c
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2015-03-14 09:00:58 -0300
committerdequis <dx@dxzone.com.ar>2015-04-10 14:10:41 -0300
commit913a663a3e383c40c644a7d0a8c8aba9d417167c (patch)
treebb1199c444c20caf25c04e4f6b982c42536c2dc0 /protocols/msn/msn_util.c
parenta4be2f6df564eea09612731be194278e4fb755e0 (diff)
msn: implement the rest of the http gateway support, enable by default
Diffstat (limited to 'protocols/msn/msn_util.c')
-rw-r--r--protocols/msn/msn_util.c4
1 files changed, 2 insertions, 2 deletions
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 {