diff options
author | Eion Robb <eion@robbmob.com> | 2008-07-18 11:53:10 +0400 |
---|---|---|
committer | Eion Robb <eion@robbmob.com> | 2008-07-18 11:53:10 +0400 |
commit | 4604bee5fd5e9992865da25e1de90f3aca09ee54 (patch) | |
tree | 8907f44fbfe6b315a947aaedb4b2a4c5839dd721 /skype_messaging_network.c | |
parent | 23e7453b5b542d4b33ff67db651f239a528ef7e0 (diff) |
Making receiving messages async (doesn't work if IM window not open)
Diffstat (limited to 'skype_messaging_network.c')
-rw-r--r-- | skype_messaging_network.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/skype_messaging_network.c b/skype_messaging_network.c index 35ae8f2..4437cce 100644 --- a/skype_messaging_network.c +++ b/skype_messaging_network.c @@ -45,8 +45,10 @@ read_function_cb(gpointer data, gint source, PurpleInputCondition cond) { if (response_string) { - response_string = g_string_append_len(response_string, response, len); + if (len > 0) + response_string = g_string_append_len(response_string, response, len); reply = g_string_free(response_string, FALSE); + response_string = NULL; } else if (len) reply = g_strndup(response, len); @@ -67,7 +69,6 @@ read_function_cb(gpointer data, gint source, PurpleInputCondition cond) g_thread_create((GThreadFunc)skype_message_received, reply, FALSE, NULL); } } - response_string = NULL; } } |