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

FreeSWITCH SVN gmaruzz at freeswitch.org
Fri Jan 9 15:46:12 PST 2009


Author: gmaruzz
Date: Fri Jan  9 17:46:12 2009
New Revision: 11107

Log:
skypiax: let's compile on the new gcc (Intrepid version)

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

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	Fri Jan  9 17:46:12 2009
@@ -1057,7 +1057,7 @@
 #ifdef WIN32
       switch_file_write(p->AsteriskHandlesAst.fdesc[1], "sciutati", &howmany);  // let's the controldev_thread die
 #else /* WIN32 */
-      write(p->AsteriskHandlesAst.fdesc[1], "sciutati", howmany);
+      howmany = write(p->AsteriskHandlesAst.fdesc[1], "sciutati", howmany);
 #endif /* WIN32 */
     }
 

Modified: freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax_protocol.c
==============================================================================
--- freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax_protocol.c	(original)
+++ freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax_protocol.c	Fri Jan  9 17:46:12 2009
@@ -269,14 +269,14 @@
     switch_file_write(p->audioskypepipe[1], kill_cli_buff, &kill_cli_size);
 #else /* WIN32 */
     kill_cli_size = SAMPLES_PER_FRAME * sizeof(short);
-    write(p->audiopipe[1], kill_cli_buff, kill_cli_size);
+    len = write(p->audiopipe[1], kill_cli_buff, kill_cli_size);
     kill_cli_size = SAMPLES_PER_FRAME * sizeof(short);
-    write(p->audioskypepipe[1], kill_cli_buff, kill_cli_size);
+    len = write(p->audioskypepipe[1], kill_cli_buff, kill_cli_size);
     p->interface_state = SKYPIAX_STATE_DOWN;
     kill_cli_size = SAMPLES_PER_FRAME * sizeof(short);
-    write(p->audiopipe[1], kill_cli_buff, kill_cli_size);
+    len = write(p->audiopipe[1], kill_cli_buff, kill_cli_size);
     kill_cli_size = SAMPLES_PER_FRAME * sizeof(short);
-    write(p->audioskypepipe[1], kill_cli_buff, kill_cli_size);
+    len = write(p->audioskypepipe[1], kill_cli_buff, kill_cli_size);
 #endif /* WIN32 */
 
     DEBUGA_SKYPE("Skype client GONE\n", SKYPIAX_P_LOG);
@@ -508,12 +508,14 @@
     switch_file_pipe_create(&p->audioskypepipe[0], &p->audioskypepipe[1],
                             skypiax_module_pool);
 #else /* WIN32 */
-  pipe(p->audiopipe);
+  if(pipe(p->audiopipe)){
   fcntl(p->audiopipe[0], F_SETFL, O_NONBLOCK);
   fcntl(p->audiopipe[1], F_SETFL, O_NONBLOCK);
-  pipe(p->audioskypepipe);
+}
+  if (pipe(p->audioskypepipe)){
   fcntl(p->audioskypepipe[0], F_SETFL, O_NONBLOCK);
   fcntl(p->audioskypepipe[1], F_SETFL, O_NONBLOCK);
+}
 #endif /* WIN32 */
   //rv = switch_file_pipe_timeout_set(p->audiopipe[0], 100);
 
@@ -568,7 +570,7 @@
 
     if (samples != SAMPLES_PER_FRAME * sizeof(short)) {
       if (samples)
-        ERRORA("SRV PIPE READ=====> NOT GOOD samples=%u expected=%lu\n", SKYPIAX_P_LOG,
+        ERRORA("SRV PIPE READ=====> NOT GOOD samples=%u expected=%u\n", SKYPIAX_P_LOG,
                samples, SAMPLES_PER_FRAME * sizeof(short));
       //do nothing
     } else {
@@ -1028,9 +1030,10 @@
   DEBUGA_PBX("ENTERING FUNC\n", SKYPIAX_P_LOG);
 
   //switch_file_pipe_create(&p->AsteriskHandlesAst.fdesc[0], &p->AsteriskHandlesAst.fdesc[1], skypiax_module_pool);
-  pipe(p->AsteriskHandlesAst.fdesc);
+if(pipe(p->AsteriskHandlesAst.fdesc)){
   fcntl(p->AsteriskHandlesAst.fdesc[0], F_SETFL, O_NONBLOCK);
   fcntl(p->AsteriskHandlesAst.fdesc[1], F_SETFL, O_NONBLOCK);
+}
 
   //switch_file_pipe_timeout_set(p->AsteriskHandlesAst.fdesc[0], 100);
   AsteriskHandlesAst = &p->AsteriskHandlesAst;
@@ -1125,7 +1128,7 @@
           howmany = strlen(b) + 1;
 
           //switch_file_write(AsteriskHandlesAst->fdesc[1], b, &howmany);
-          write(AsteriskHandlesAst->fdesc[1], b, howmany);
+          howmany = write(AsteriskHandlesAst->fdesc[1], b, howmany);
           //write(AsteriskHandlesAst->fdesc[1], "\0", 1);
           //FIXME DEBUGA_SKYPE("SKYPE pipewrite: |||%s|||len=%d serial=%ld\n\n\n", SKYPIAX_P_LOG, b, strlen(b) + 1, an_event.xclient.serial);
           //switch_sleep(1000);



More information about the Freeswitch-svn mailing list