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>2011-01-16 01:49:11 +0300
committerEion Robb <eion@robbmob.com>2011-01-16 01:49:11 +0300
commit110201bd8ff7a9ccbba929d96b7f917b9ffd145f (patch)
tree9cb221fba18ec365bc21cf357a05d675f301591b /skype_messaging_x11.c
parent9d2a1f6881a0b0f677d0fe0ea77f00425e9e9b3a (diff)
Jiggle around the connection methods so that not connecting to Skype isn't fatal (so doesn't need the account to be re-enabled) and clean up some memory if connecting on X11
Diffstat (limited to 'skype_messaging_x11.c')
-rw-r--r--skype_messaging_x11.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/skype_messaging_x11.c b/skype_messaging_x11.c
index 67c099e..2090c18 100644
--- a/skype_messaging_x11.c
+++ b/skype_messaging_x11.c
@@ -73,6 +73,7 @@ skype_connect()
XFlush(disp);
if (win == -1)
{
+ XCloseDisplay(disp);
skype_debug_info("skype_x11", "Could not create X11 messaging window\n");
return FALSE;
}
@@ -80,6 +81,9 @@ skype_connect()
skype_inst = XInternAtom(disp, "_SKYPE_INSTANCE", True);
if (skype_inst == None)
{
+ XDestroyWindow(disp, win);
+ XCloseDisplay(disp);
+ win = (Window)-1;
skype_win = (Window)-1;
skype_debug_info("skype_x11", "Could not create skype Atom\n");
return FALSE;
@@ -88,6 +92,9 @@ skype_connect()
status = XGetWindowProperty(disp, root, skype_inst, 0, 1, False, XA_WINDOW, &type_ret, &format_ret, &nitems_ret, &bytes_after_ret, &prop);
if(status != Success || format_ret != 32 || nitems_ret < 1)
{
+ XDestroyWindow(disp, win);
+ XCloseDisplay(disp);
+ win = (Window)-1;
XFree(prop);
skype_win = (Window)-1;
skype_debug_info("skype", "Skype instance not found\n");