]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix proto regression from last commit
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 19 Sep 2013 23:34:58 +0000 (19:34 -0400)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 19 Sep 2013 23:34:58 +0000 (19:34 -0400)
libs/sofia-sip/.update
libs/sofia-sip/libsofia-sip-ua/tport/ws.c

index 08dde90dbd62b0b0c8b4b7fffd6e9a63bfaa1495..52bf634e8efef93887549b74144b177746b41cb1 100644 (file)
@@ -1 +1 @@
-Thu Sep 19 13:44:16 CDT 2013
+Thu Sep 19 19:34:50 EDT 2013
index 7ee756c729c0388d310f5ac795f0de6356bd3895..a8d056c8955ec3bd5bd0366963aedddf0d118d2f 100644 (file)
@@ -223,6 +223,7 @@ int ws_handshake(wsh_t *wsh)
        char key[256] = "";
        char version[5] = "";
        char proto[256] = "";
+       char proto_buf[384] = "";
        char uri[256] = "";
        char input[256] = "";
        unsigned char output[SHA1_HASH_SIZE] = "";
@@ -274,7 +275,7 @@ int ws_handshake(wsh_t *wsh)
        b64encode((unsigned char *)output, SHA1_HASH_SIZE, (unsigned char *)b64, sizeof(b64));
 
        if (*proto) {
-               snprintf(proto, sizeof(proto), "Sec-WebSocket-Protocol: %s\r\n", proto);
+               snprintf(proto_buf, sizeof(proto_buf), "Sec-WebSocket-Protocol: %s\r\n", proto);
        }
 
        snprintf(respond, sizeof(respond), 
@@ -284,7 +285,7 @@ int ws_handshake(wsh_t *wsh)
                         "Sec-WebSocket-Accept: %s\r\n"
                         "%s\r\n",
                         b64,
-                        proto);
+                        proto_buf);
 
 
        ws_raw_write(wsh, respond, strlen(respond));