]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-6103 --resolve
authorJeff Lenk <jeff@jefflenk.com>
Fri, 17 Jan 2014 22:27:00 +0000 (16:27 -0600)
committerJeff Lenk <jeff@jefflenk.com>
Fri, 17 Jan 2014 22:27:00 +0000 (16:27 -0600)
src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
src/mod/xml_int/mod_xml_rpc/ws.c

index 45559e9a63d84da56dc3b539b8dc6f4e37cb9fa9..4e2776281a920e74f26f87cdded8dd510300ac50 100644 (file)
@@ -594,7 +594,7 @@ abyss_bool websocket_hook(TSession *r)
 
        wsh = ws_init(r);
        if (!wsh) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "websocket error %d\n", ret);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "websocket memory error\n");
                return FALSE;
        }
 
index 1ca27bdce489fa57b3f2059d6b1869f8fa312627..9099444189183108b64910ecb138c345fd4755a4 100644 (file)
@@ -93,7 +93,7 @@ void init_ssl(void) {
        /* verify private key */
        if ( !SSL_CTX_check_private_key(globals.ssl_ctx) ) {
                abort();
-    }
+       }
 
        SSL_CTX_set_cipher_list(globals.ssl_ctx, "HIGH:!DSS:!aNULL@STRENGTH");
 
@@ -119,27 +119,27 @@ static int cheezy_get_var(char *data, char *name, char *buf, size_t buflen)
    */
 
   do {
-    if(!strncmp(p,name,strlen(name)) && *(p+strlen(name))==':') break;
+       if(!strncmp(p,name,strlen(name)) && *(p+strlen(name))==':') break;
   } while((p = (strstr(p,"\n")+1))!=(char *)1);
 
 
   if (p != (char *)1 && *p!='\0') {
-    char *v, *e = 0;
+       char *v, *e = 0;
 
-    v = strchr(p, ':');
-    if (v) {
-      v++;
-      while(v && *v == ' ') {
+       v = strchr(p, ':');
+       if (v) {
+         v++;
+         while(v && *v == ' ') {
        v++;
-      }
-      if (v)  {
+         }
+         if (v)  {
        e = strchr(v, '\r');
        if (!e) {
          e = strchr(v, '\n');
        }
-      }
+         }
                        
-      if (v && e) {
+         if (v && e) {
        int cplen;
        size_t len = e - v;
        
@@ -152,9 +152,9 @@ static int cheezy_get_var(char *data, char *name, char *buf, size_t buflen)
        strncpy(buf, v, cplen);
        *(buf+cplen) = '\0';
        return 1;
-      }
-      
-    }
+         }
+         
+       }
   }
   return 0;
 }
@@ -267,7 +267,7 @@ issize_t ws_raw_read(wsh_t *wsh, void *data, size_t bytes)
 {
        issize_t r;
        int x = 0;
-       TConn *conn = wsh->tsession->connP;
+       TConn *conn = wsh->tsession->connP;
 
        if (!wsh->handshake) {
                r = wsh->tsession->connP->buffersize;
@@ -311,7 +311,6 @@ issize_t ws_raw_read(wsh_t *wsh, void *data, size_t bytes)
 
        }
 
-       return r;
 }
 
 issize_t ws_raw_write(wsh_t *wsh, void *data, size_t bytes)
@@ -331,13 +330,11 @@ issize_t ws_raw_write(wsh_t *wsh, void *data, size_t bytes)
        } else {
                return 0;
        }
-
-       return r;
 }
 
 wsh_t * ws_init(ws_tsession_t *tsession)
 {
-       wsh_t *wsh = malloc(sizeof(*wsh));
+       wsh_t *wsh = (wsh_t *)malloc(sizeof(*wsh));
 
        if (!wsh) return NULL;