]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
skypiax: great startup speedup in Windows (using only one Broadcast sendmessage for...
authorGiovanni Maruzzelli <gmaruzz@gmail.com>
Sun, 19 Apr 2009 22:44:45 +0000 (22:44 +0000)
committerGiovanni Maruzzelli <gmaruzz@gmail.com>
Sun, 19 Apr 2009 22:44:45 +0000 (22:44 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13083 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_skypiax/skypiax_protocol.c

index 535e805834724ea72aae928549976f9ce9998c35..55dd5afeb0b1e1a85a15779cbb0914508c54ea7c 100644 (file)
@@ -1007,6 +1007,7 @@ LRESULT APIENTRY skypiax_present(HWND hWindow, UINT uiMessage, WPARAM uiParam,
         case SKYPECONTROLAPI_ATTACH_PENDING_AUTHORIZATION:
           //DEBUGA_SKYPE ("\n\n\tIf I do not (almost) immediately connect to Skype API,\n\tplease give the Skype client authorization to be connected \n\tby Asterisk and to not ask you again.\n\n", SKYPIAX_P_LOG);
           skypiax_sleep(5000);
+#if 0
           if (!tech_pvt->SkypiaxHandles.currentuserhandle) {
             SendMessage(HWND_BROADCAST,
                         tech_pvt->
@@ -1014,6 +1015,7 @@ LRESULT APIENTRY skypiax_present(HWND hWindow, UINT uiMessage, WPARAM uiParam,
                         (WPARAM) tech_pvt->SkypiaxHandles.win32_hInit_MainWindowHandle,
                         0);
           }
+#endif
           break;
         case SKYPECONTROLAPI_ATTACH_REFUSED:
           ERRORA("Skype client refused to be connected by Skypiax!\n", SKYPIAX_P_LOG);
@@ -1024,6 +1026,7 @@ LRESULT APIENTRY skypiax_present(HWND hWindow, UINT uiMessage, WPARAM uiParam,
         case SKYPECONTROLAPI_ATTACH_API_AVAILABLE:
           DEBUGA_SKYPE("Skype API available\n", SKYPIAX_P_LOG);
           skypiax_sleep(5000);
+#if 0
           if (!tech_pvt->SkypiaxHandles.currentuserhandle) {
             SendMessage(HWND_BROADCAST,
                         tech_pvt->
@@ -1031,6 +1034,7 @@ LRESULT APIENTRY skypiax_present(HWND hWindow, UINT uiMessage, WPARAM uiParam,
                         (WPARAM) tech_pvt->SkypiaxHandles.win32_hInit_MainWindowHandle,
                         0);
           }
+#endif
           break;
         default:
           WARNINGA("GOT AN UNKNOWN SKYPE WINDOWS MSG\n", SKYPIAX_P_LOG);
@@ -1139,7 +1143,7 @@ void *skypiax_do_skypeapi_thread_func(void *obj)
   tech_pvt->SkypiaxHandles.win32_uiGlobal_MsgID_SkypeControlAPIDiscover =
     RegisterWindowMessage("SkypeControlAPIDiscover");
 
-  skypiax_sleep(2000000);
+  skypiax_sleep(200000); //0,2 sec
 
   if (tech_pvt->SkypiaxHandles.win32_uiGlobal_MsgID_SkypeControlAPIAttach != 0
       && tech_pvt->SkypiaxHandles.win32_uiGlobal_MsgID_SkypeControlAPIDiscover != 0) {