From: Anthony Minessale Date: Thu, 19 Sep 2013 23:34:58 +0000 (-0400) Subject: fix proto regression from last commit X-Git-Tag: v1.5.8~87 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8493c88f88d93854b4eeb4a11a33c822951347db;p=thirdparty%2Ffreeswitch.git fix proto regression from last commit --- diff --git a/libs/sofia-sip/.update b/libs/sofia-sip/.update index 08dde90dbd..52bf634e8e 100644 --- a/libs/sofia-sip/.update +++ b/libs/sofia-sip/.update @@ -1 +1 @@ -Thu Sep 19 13:44:16 CDT 2013 +Thu Sep 19 19:34:50 EDT 2013 diff --git a/libs/sofia-sip/libsofia-sip-ua/tport/ws.c b/libs/sofia-sip/libsofia-sip-ua/tport/ws.c index 7ee756c729..a8d056c895 100644 --- a/libs/sofia-sip/libsofia-sip-ua/tport/ws.c +++ b/libs/sofia-sip/libsofia-sip-ua/tport/ws.c @@ -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));