Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/EionRobb/skype4pidgin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEion Robb <eion@robbmob.com>2008-07-22 06:35:30 +0400
committerEion Robb <eion@robbmob.com>2008-07-22 06:35:30 +0400
commit38ce2d70669701d332c49a0c2e65a4ae24b1bbb3 (patch)
treeb926ca0d18f19e3524e508391b455248285e41a7 /skype_messaging_network.c
parenta7d08f479ff09c36b31a8fb06da2bdf2585241b2 (diff)
Append incomplete message back onto buffer
Diffstat (limited to 'skype_messaging_network.c')
-rw-r--r--skype_messaging_network.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/skype_messaging_network.c b/skype_messaging_network.c
index 901d645..704fdb0 100644
--- a/skype_messaging_network.c
+++ b/skype_messaging_network.c
@@ -57,7 +57,7 @@ read_function_cb(gpointer data, gint source, PurpleInputCondition cond)
reply = g_strstrip(reply);
reply_pieces = g_strsplit(reply, etb_string, -1);
g_free(reply);
- for (i=0; reply_pieces[i]; i++)
+ for (i=0; reply_pieces[i+1]; i++)
{
reply = reply_pieces[i];
if (g_str_equal(reply, "LOGIN"))
@@ -68,6 +68,11 @@ read_function_cb(gpointer data, gint source, PurpleInputCondition cond)
g_thread_create((GThreadFunc)skype_message_received, g_strdup(reply), FALSE, NULL);
}
}
+ //check that we received part of a message
+ if (strlen(reply_pieces[i]))
+ {
+ response_string = g_string_new(reply_pieces[i]);
+ }
g_strfreev(reply_pieces);
}
}