[Freeswitch-branches] [commit] r11711 - freeswitch/branches/gmaruzz/mod_skypiax

FreeSWITCH SVN gmaruzz at freeswitch.org
Mon Feb 9 09:34:30 PST 2009


Author: gmaruzz
Date: Mon Feb  9 11:34:30 2009
New Revision: 11711

Log:
skypiax: cleaning skypiax_protocol.c

Modified:
   freeswitch/branches/gmaruzz/mod_skypiax/skypiax_protocol.c

Modified: freeswitch/branches/gmaruzz/mod_skypiax/skypiax_protocol.c
==============================================================================
--- freeswitch/branches/gmaruzz/mod_skypiax/skypiax_protocol.c	(original)
+++ freeswitch/branches/gmaruzz/mod_skypiax/skypiax_protocol.c	Mon Feb  9 11:34:30 2009
@@ -303,34 +303,6 @@
   return NULL;
 }
 
-int skypiax_skypeaudio_init(private_t * tech_pvt)
-{
-
-#if defined(WIN32) && !defined(__CYGWIN__)
-  switch_status_t rv;
-  rv =
-    switch_file_pipe_create(&tech_pvt->audiopipe[0], &tech_pvt->audiopipe[1],
-                            skypiax_module_pool);
-  rv =
-    switch_file_pipe_create(&tech_pvt->audioskypepipe[0], &tech_pvt->audioskypepipe[1],
-                            skypiax_module_pool);
-#else /* WIN32 */
-  if (pipe(tech_pvt->audiopipe)) {
-    fcntl(tech_pvt->audiopipe[0], F_SETFL, O_NONBLOCK);
-    fcntl(tech_pvt->audiopipe[1], F_SETFL, O_NONBLOCK);
-  }
-  if (pipe(tech_pvt->audioskypepipe)) {
-    fcntl(tech_pvt->audioskypepipe[0], F_SETFL, O_NONBLOCK);
-    fcntl(tech_pvt->audioskypepipe[1], F_SETFL, O_NONBLOCK);
-  }
-#endif /* WIN32 */
-
-/* this pipe is the audio fd for asterisk to poll on during a call. FS do not use it */
-  tech_pvt->skypiax_sound_capt_fd = tech_pvt->audiopipe[0];
-
-  return 0;
-}
-
 int skypiax_skypeaudio_read(private_t * tech_pvt)
 {
   unsigned int samples;
@@ -843,7 +815,17 @@
 
   return res;
 }
-
+int skypiax_skypeaudio_init(private_t * tech_pvt)
+{
+  switch_status_t rv;
+  rv =
+    switch_file_pipe_create(&tech_pvt->audiopipe[0], &tech_pvt->audiopipe[1],
+                            skypiax_module_pool);
+  rv =
+    switch_file_pipe_create(&tech_pvt->audioskypepipe[0], &tech_pvt->audioskypepipe[1],
+                            skypiax_module_pool);
+  return 0;
+}
 #else /* WIN32 */
 int skypiax_pipe_read(int pipe, short *buf, int howmany)
 {
@@ -863,6 +845,22 @@
 
   return res;
 }
+int skypiax_skypeaudio_init(private_t * tech_pvt)
+{
+  if (pipe(tech_pvt->audiopipe)) {
+    fcntl(tech_pvt->audiopipe[0], F_SETFL, O_NONBLOCK);
+    fcntl(tech_pvt->audiopipe[1], F_SETFL, O_NONBLOCK);
+  }
+  if (pipe(tech_pvt->audioskypepipe)) {
+    fcntl(tech_pvt->audioskypepipe[0], F_SETFL, O_NONBLOCK);
+    fcntl(tech_pvt->audioskypepipe[1], F_SETFL, O_NONBLOCK);
+  }
+
+/* this pipe is the audio fd for asterisk to poll on during a call. FS do not use it */
+  tech_pvt->skypiax_sound_capt_fd = tech_pvt->audiopipe[0];
+
+  return 0;
+}
 #endif /* WIN32 */
 
 



More information about the Freeswitch-branches mailing list