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>2007-11-14 00:21:56 +0300
committerEion Robb <eion@robbmob.com>2007-11-14 00:21:56 +0300
commite91e13c7349636cd776ebb0b875317d3dc32310b (patch)
treee2a31e71d5582fa2ad05c0ba16e938f5b8b2cd7b /skype_messaging_x11.c
parent61f1ca482f8b0b5280587e89dedb20aa3534b0c6 (diff)
Comment cleanup
Diffstat (limited to 'skype_messaging_x11.c')
-rw-r--r--skype_messaging_x11.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/skype_messaging_x11.c b/skype_messaging_x11.c
index d92e2ac..bc41c0d 100644
--- a/skype_messaging_x11.c
+++ b/skype_messaging_x11.c
@@ -24,8 +24,6 @@ skype_connect()
unsigned char *prop;
int status;
- /*purple_debug_info("skype_x11", "Starting X11 Connection\n");*/
-
disp = XOpenDisplay(getenv("DISPLAY"));
if (disp == NULL)
{
@@ -57,7 +55,6 @@ skype_connect()
run_loop = TRUE;
receiving_thread = g_thread_create((GThreadFunc)receive_message_loop, NULL, FALSE, NULL);
- /*purple_debug_info("skype_x11", "Receiving_thread: %d\n", receiving_thread);*/
return TRUE;
}
@@ -119,7 +116,7 @@ send_message(char* message)
e.xclient.message_type = message_start; /* first message */
e.xclient.display = disp;
e.xclient.window = win;
- e.xclient.format = 8;
+ e.xclient.format = 8; /* 8-bit values */
XSetErrorHandler(x11_error_handler);
do
@@ -132,7 +129,6 @@ send_message(char* message)
pos += i;
} while( pos <= len );
- /*purple_debug_info("skype_x11", "Flushing\n");*/
XFlush(disp);
if (x11_error_code == BadWindow)
@@ -156,14 +152,12 @@ receive_message_loop(void)
XEvent e;
GString *msg = NULL;
char msg_temp[21];
- int last_len, real_len;
- /* TODO Detect XWindow disconnects */
+ int last_len, real_len;
+
msg_temp[21] = '\0';
while(run_loop)
{
- /* purple_debug_info("skype_x11", "Waiting for event on display %d window %d\n", disp, win); */
XNextEvent(disp, &e);
- /*purple_debug_info("skype_x11", "Event received\n");*/
if (e.type != ClientMessage)
{
purple_debug_info("skype_x11", "Unknown event received: %d\n", e.xclient.type);
@@ -171,7 +165,6 @@ receive_message_loop(void)
XFlush(disp);
continue;
}
- /*purple_debug_info("skype_x11", "Event format %d\n", e.xclient.format);*/
strncpy(msg_temp, e.xclient.data.b, 20);
real_len = last_len = strlen(msg_temp);
if (last_len >= 21)
@@ -179,8 +172,6 @@ receive_message_loop(void)
last_len = 21;
real_len = 20;
}
- /* purple_debug_info("skype_x11", "Received: %20s Length: %d\n", msg_temp, last_len); */
- /*purple_debug_info("skype_x11", "Message type: %s\n", XGetAtomName(disp, e.xclient.message_type));*/
if (e.xclient.message_type == message_start)
msg = g_string_new_len(msg_temp, real_len);
else if (e.xclient.message_type == message_continue)
@@ -192,9 +183,8 @@ receive_message_loop(void)
continue;
}
- if (last_len < 21) /* msg->str[msg->len] == '\0') */
+ if (last_len < 21)
{
- /*purple_debug_info("skype_x11", "Complete message received: %s. Sending to Skype\n", msg->str);*/
g_thread_create((GThreadFunc)skype_message_received, (void *)g_strdup(msg->str), FALSE, NULL);
XFlush(disp);
usleep(500);