diff --git a/src/mod/endpoints/mod_skypopen/configs/client.c b/src/mod/endpoints/mod_skypopen/configs/client.c index 87c4c6c422..062281d641 100644 --- a/src/mod/endpoints/mod_skypopen/configs/client.c +++ b/src/mod/endpoints/mod_skypopen/configs/client.c @@ -87,7 +87,8 @@ int skypopen_send_message(struct SkypopenHandles *SkypopenHandles, const char *m pos += i; } while (pos <= len); - XSync(disp, False); + //giovanni XSync(disp, False); + XFlush(disp); ok = X11_errors_untrap(); if (!ok) diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen.c b/src/mod/endpoints/mod_skypopen/mod_skypopen.c index 97d0ce6778..3c41524550 100644 --- a/src/mod/endpoints/mod_skypopen/mod_skypopen.c +++ b/src/mod/endpoints/mod_skypopen/mod_skypopen.c @@ -364,6 +364,8 @@ static switch_status_t remove_interface(char *the_interface) if (tech_pvt->running && tech_pvt->SkypopenHandles.disp) { XEvent e; Atom atom1 = XInternAtom(tech_pvt->SkypopenHandles.disp, "SKYPECONTROLAPI_MESSAGE_BEGIN", False); + switch_sleep(1000);//giovanni + XFlush(tech_pvt->SkypopenHandles.disp); //giovanni memset(&e, 0, sizeof(e)); e.xclient.type = ClientMessage; e.xclient.message_type = atom1; /* leading message */ @@ -372,7 +374,8 @@ static switch_status_t remove_interface(char *the_interface) e.xclient.format = 8; XSendEvent(tech_pvt->SkypopenHandles.disp, tech_pvt->SkypopenHandles.win, False, 0, &e); - XSync(tech_pvt->SkypopenHandles.disp, False); + //giovanni XSync(tech_pvt->SkypopenHandles.disp, False); + XFlush(tech_pvt->SkypopenHandles.disp); //giovanni } #endif } @@ -1500,6 +1503,7 @@ static switch_status_t load_config(int reload_type) SKYPOPEN_P_LOG, interface_id, globals.SKYPOPEN_INTERFACES[interface_id].skype_user); +/* giovanni*/ skypopen_signaling_write(&globals.SKYPOPEN_INTERFACES[interface_id], "PROTOCOL 7"); switch_sleep(10000); skypopen_signaling_write(&globals.SKYPOPEN_INTERFACES[interface_id], "SET AUTOAWAY OFF"); @@ -1516,6 +1520,7 @@ static switch_status_t load_config(int reload_type) skypopen_signaling_write(&globals.SKYPOPEN_INTERFACES[interface_id], "SET SILENT_MODE ON"); switch_sleep(10000); } +/* giovanni */ } else { ERRORA ("The Skype client to which we are connected FAILED to gave us CURRENTUSERHANDLE=%s, interface_id=%d FAILED to start. No Skype client logged in as '%s' has been found. Please (re)launch a Skype client logged in as '%s'. Skypopen exiting now\n", @@ -1742,6 +1747,8 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_skypopen_shutdown) XEvent e; Atom atom1 = XInternAtom(tech_pvt->SkypopenHandles.disp, "SKYPECONTROLAPI_MESSAGE_BEGIN", False); + switch_sleep(1000);//giovanni + XFlush(tech_pvt->SkypopenHandles.disp); //giovanni memset(&e, 0, sizeof(e)); e.xclient.type = ClientMessage; e.xclient.message_type = atom1; /* leading message */ @@ -1750,7 +1757,8 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_skypopen_shutdown) e.xclient.format = 8; XSendEvent(tech_pvt->SkypopenHandles.disp, tech_pvt->SkypopenHandles.win, False, 0, &e); - XSync(tech_pvt->SkypopenHandles.disp, False); + //giovanni XSync(tech_pvt->SkypopenHandles.disp, False); + XFlush(tech_pvt->SkypopenHandles.disp); //giovanni } #endif } diff --git a/src/mod/endpoints/mod_skypopen/skypopen_protocol.c b/src/mod/endpoints/mod_skypopen/skypopen_protocol.c index 77568c6e5c..6f4fc33b65 100644 --- a/src/mod/endpoints/mod_skypopen/skypopen_protocol.c +++ b/src/mod/endpoints/mod_skypopen/skypopen_protocol.c @@ -1458,6 +1458,9 @@ int skypopen_send_message(private_t * tech_pvt, const char *message_P) unsigned int len = strlen(message_P); XEvent e; +skypopen_sleep(1000);//giovanni + XFlush(disp);//giovanni + memset(&e, 0, sizeof(e)); e.xclient.type = ClientMessage; e.xclient.message_type = atom1; /* leading message */ @@ -1476,7 +1479,8 @@ int skypopen_send_message(private_t * tech_pvt, const char *message_P) pos += i; } while (pos <= len); - XSync(disp, False); + //giovanni XSync(disp, False); + XFlush(disp); ok = X11_errors_untrap(); if (!ok) {