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>2010-12-20 05:49:23 +0300
committerEion Robb <eion@robbmob.com>2010-12-20 05:49:23 +0300
commit9d2a1f6881a0b0f677d0fe0ea77f00425e9e9b3a (patch)
treef3baaf95f3287a55e6aaadc0be612466a7586429
parent3c22116665656becd6d7f0c7ef8ce2826179b227 (diff)
Patch to fix running on FreeBSD, thanks to help of matthias.andree. Fixes issue #135.
-rw-r--r--skype_messaging.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/skype_messaging.c b/skype_messaging.c
index 04d9b8c..aaa7bf3 100644
--- a/skype_messaging.c
+++ b/skype_messaging.c
@@ -173,16 +173,12 @@ char *skype_send_message(char *message_format, ...)
char *message;
char *return_msg;
va_list args;
-#ifdef __APPLE__
- guint timeout = 0;
-#else
-#ifdef _WIN32
+#if __APPLE__ || _WIN32 || __FreeBSD__
guint timeout = 0;
#else
gboolean condition_result;
GTimeVal endtime = {0,0};
#endif
-#endif
va_start(args, message_format);
message = g_strdup_vprintf(message_format, args);
@@ -223,6 +219,12 @@ char *skype_send_message(char *message_format, ...)
if (timeout++ == 10000)
#else
+#ifdef __FreeBSD__
+ usleep(1000);
+ g_static_mutex_lock2(&mutex);
+
+ if (timeout++ == 10000)
+#else
//wait for message for a maximum of 10 seconds
g_get_current_time(&endtime);
@@ -235,6 +237,7 @@ char *skype_send_message(char *message_format, ...)
if(!condition_result)
#endif
#endif
+#endif
{
//we timed out while waiting
g_hash_table_remove(message_queue, &cur_message_num);