[Freeswitch-branches] [commit] r10605 - freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax

FreeSWITCH SVN gmaruzz at freeswitch.org
Thu Dec 4 19:51:12 PST 2008


Author: gmaruzz
Date: Thu Dec  4 22:51:12 2008
New Revision: 10605

Log:
skypiax: let's try to overcome the lack of timeout on pipe's read on Windows. And closesocket the sockets

Modified:
   freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/mod_skypiax.2008.vcproj
   freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/mod_skypiax.c

Modified: freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/mod_skypiax.2008.vcproj
==============================================================================
--- freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/mod_skypiax.2008.vcproj	(original)
+++ freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/mod_skypiax.2008.vcproj	Thu Dec  4 22:51:12 2008
@@ -3,7 +3,7 @@
 	ProjectType="Visual C++"
 	Version="9,00"
 	Name="mod_skypiax"
-	ProjectGUID="{FE3540C5-3303-46E0-A69E-D92F775687F1}"
+	ProjectGUID="{C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}"
 	RootNamespace="mod_skypiax"
 	Keyword="Win32Proj"
 	TargetFrameworkVersion="131072"
@@ -54,7 +54,7 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalOptions="rpcrt4.lib"
+				AdditionalOptions="rpcrt4.lib &quot;..\..\..\..\libs\win32\pthread\pthreadvc2.lib&quot; &quot;..\..\..\..\libs\win32\apr\debug\libapr-1.lib&quot; &quot;..\..\..\..\w32\library\debug\freeswitchcore.lib&quot;"
 				RandomizedBaseAddress="1"
 				DataExecutionPrevention="0"
 			/>

Modified: freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/mod_skypiax.c
==============================================================================
--- freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/mod_skypiax.c	(original)
+++ freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/mod_skypiax.c	Thu Dec  4 22:51:12 2008
@@ -34,8 +34,8 @@
  *
  */
 
-#undef WIN32_SKYPIAX
-#undef __CYGWIN__
+#define WIN32_SKYPIAX
+#define __CYGWIN__
 #define MOD_SKYPIAX
 #ifdef MOD_SKYPIAX
 
@@ -687,6 +687,9 @@
   int exit = 0;
   int a;
   int i;
+  unsigned int kill_cli_size;
+  short kill_cli_buff[320];
+  private_t *tech_pvt;
 
   if (option_debug > 10) {
     WARNINGA("ENTERING FUNC\n", SKYPIAX_P_LOG);
@@ -789,11 +792,20 @@
       }
   }
     }
+
+
+
+    p->interface_state = SKYPIAX_STATE_DOWN;
+    kill_cli_size=320;
+    switch_file_write(p->audioskypepipe[1], kill_cli_buff, &kill_cli_size);
+
     DEBUGA_SKYPE("Skype client GONE\n", SKYPIAX_P_LOG);
     //switch_sleep(1000000);
 
 #ifndef WIN32_SKYPIAX
     close(fd);
+#else
+    closesocket(fd);
 #endif
     if (exit)
       break;
@@ -802,6 +814,8 @@
   WARNINGA("server (I am it) GONE\n", SKYPIAX_P_LOG);
 #ifndef WIN32_SKYPIAX
   close(s);
+#else
+  closesocket(s);
 #endif
   if (option_debug > 10) {
     DEBUGA_PBX("EXITING FUNC\n", SKYPIAX_P_LOG);
@@ -847,6 +861,8 @@
     }
 #ifndef WIN32_SKYPIAX
   close(s);
+#else
+  closesocket(s);
 #endif
     return NULL;
   }
@@ -911,6 +927,8 @@
     ERRORA("Skype server GONE\n", SKYPIAX_P_LOG);
 #ifndef WIN32_SKYPIAX
     close(fd);
+#else
+    closesocket(fd);
 #endif
     //if (exit)
       break;
@@ -919,6 +937,8 @@
   WARNINGA("client (I am it) GONE\n", SKYPIAX_P_LOG);
 #ifndef WIN32_SKYPIAX
   close(s);
+#else
+  closesocket(s);
 #endif
   if (option_debug > 10) {
     DEBUGA_PBX("EXITING FUNC\n", SKYPIAX_P_LOG);



More information about the Freeswitch-branches mailing list