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-02-11 01:37:31 +0300
committerEion Robb <eion@robbmob.com>2008-02-11 01:37:31 +0300
commit274fbcc27c5cfcad2a3b1d83a5ac33edeb5ac55a (patch)
treeafaf1e65135b28924a1af7f934d12944b7a86042 /skype_messaging_x11.c
parenta4e766a0d32852d8b09c25a6b37aa407f446bddf (diff)
Thread fixes, speed fixes
Diffstat (limited to 'skype_messaging_x11.c')
-rw-r--r--skype_messaging_x11.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/skype_messaging_x11.c b/skype_messaging_x11.c
index 63965e2..39c1970 100644
--- a/skype_messaging_x11.c
+++ b/skype_messaging_x11.c
@@ -24,6 +24,7 @@ skype_connect()
unsigned char *prop;
int status;
+ XSetErrorHandler(x11_error_handler);
disp = XOpenDisplay(getenv("DISPLAY"));
if (disp == NULL)
{
@@ -104,7 +105,7 @@ send_message(char* message)
XEvent e;
int message_num;
char error_return[15];
- unsigned int i;
+ unsigned int i;
if (skype_win == -1 || win == -1 || disp == NULL)
{
@@ -117,8 +118,8 @@ send_message(char* message)
g_thread_create((GThreadFunc)skype_message_received, (void *)g_strdup(error_return), FALSE, NULL);
}
return;
- }
-
+ }
+
memset(&e, 0, sizeof(e));
e.xclient.type = ClientMessage;
e.xclient.message_type = message_start; /* first message */
@@ -126,7 +127,6 @@ send_message(char* message)
e.xclient.window = win;
e.xclient.format = 8; /* 8-bit values */
- XSetErrorHandler(x11_error_handler);
do
{
for( i = 0; i < 20 && i + pos <= len; ++i )
@@ -135,9 +135,9 @@ send_message(char* message)
e.xclient.message_type = message_continue; /* 2nd or greater message */
pos += i;
- } while( pos <= len );
-
- XFlush(disp);
+ } while( pos <= len );
+
+ //XFlush(disp);
if (x11_error_code == BadWindow)
{
@@ -200,10 +200,10 @@ receive_message_loop(void)
if (len < 20)
{
- if (msg->str[0] == '#')
+ //if (msg->str[0] == '#')
g_thread_create((GThreadFunc)skype_message_received, (void *)g_string_free(msg, FALSE), FALSE, NULL);
- else
- purple_timeout_add(1, (GSourceFunc)skype_handle_received_message, (gpointer)g_string_free(msg, FALSE));
+ //else
+ // purple_timeout_add(1, (GSourceFunc)skype_handle_received_message, (gpointer)g_string_free(msg, FALSE));
XFlush(disp);
}
}