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

FreeSWITCH SVN gmaruzz at freeswitch.org
Wed Dec 10 09:33:52 PST 2008


Author: gmaruzz
Date: Wed Dec 10 12:33:52 2008
New Revision: 10700

Log:
skypiax: more warnings, but at least we got audio ;-)

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

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	Wed Dec 10 12:33:52 2008
@@ -20,13 +20,13 @@
                                                           void *obj)
 {
   struct skypiax_interface *p = obj;
-  short out[GG / 2];
+  short srv_out[GG / 2];
   int s;
 #ifdef WIN32
   unsigned int len;
   unsigned int i;
   unsigned int a;
-  char in[GG];
+  short srv_in[GG];
   int sin_size;
   unsigned int fd;
 #else
@@ -100,19 +100,19 @@
       rt = select(fdselect + 1, &fs, NULL, NULL, &to);
       if (rt > 0) {
 
-        len = recv(fd, in, sizeof(short) * GG, 0);
+        len = recv(fd, srv_in, sizeof(short) * GG, 0);
         //DEBUGA_SKYPE("recv %d\n", SKYPIAX_P_LOG, len);
         if (len > 0) {
           a = 0;
           for (i = 0; i < len / sizeof(short); i++) {
-            out[a] = in[i];
+            srv_out[a] = srv_in[i];
             i++;
             a++;
           }
 
           if (!p->audiobuf_is_loaded) {
             for (i = 0; i < (len / sizeof(short)) / 2; i++) {
-              p->audiobuf[i] = out[i];
+              p->audiobuf[i] = srv_out[i];
             }
             p->audiobuf_is_loaded = 1;
           } else {
@@ -125,7 +125,7 @@
 
             howmany = len / 2 / 2;
             for (a = 0; a < howmany; a++) {
-              totalbuf[i] = out[a];
+              totalbuf[i] = srv_out[a];
               i++;
             }
 
@@ -192,16 +192,16 @@
   unsigned int len;
   unsigned int i;
   unsigned int a;
-  char in[NN / 2];
-  char out[NN];
+  short cli_in[NN / 2];
+  short cli_out[NN];
   int sin_size;
   unsigned int fd;
 #else
   int len;
   int i;
   int a;
-  short in[NN / 2];
-  short out[NN];
+  short cli_in[NN / 2];
+  short cli_out[NN];
   unsigned int sin_size;
   int fd;
 #endif /* WIN32 */
@@ -266,18 +266,18 @@
       if (rt > 0) {
 
         got = (NN / 2) * sizeof(short);
-        switch_file_read(p->audioskypepipe[0], in, &got);
+        switch_file_read(p->audioskypepipe[0], cli_in, &got);
 
         if (got > 0) {
           a = 0;
           for (i = 0; i < got / sizeof(short); i++) {
-            out[a] = in[i];
+            cli_out[a] = cli_in[i];
             a++;
-            out[a] = in[i];
+            cli_out[a] = cli_in[i];
             a++;
           }
 
-          len = send(fd, out, got * 2, 0);
+          len = send(fd, cli_out, got * 2, 0);
 
           if (len == 0) {
             ERRORA("Skype server GONE\n", SKYPIAX_P_LOG);



More information about the Freeswitch-branches mailing list