Merge pull request #1227 in FS/freeswitch from ~NBLASGEN/freeswitch:bugfix/FS-10128-v8-socket-implementation-uses-strlen to master
* commit 'fabe27abde36044e917e9ac396ee0ca2f05b8535': FS-10128 [mod_v8] This commit removes strlen() in favor of binary safe .length() function
This commit is contained in:
commit
130dba8915
|
@ -140,7 +140,7 @@ JS_SOCKET_FUNCTION_IMPL(Send)
|
|||
switch_status_t ret;
|
||||
String::Utf8Value str(info[0]);
|
||||
const char *buffer = js_safe_str(*str);
|
||||
switch_size_t len = strlen(buffer);
|
||||
switch_size_t len = str.length(); // binary safe version of strlen()
|
||||
ret = switch_socket_send(this->_socket, buffer, &len);
|
||||
|
||||
if (ret != SWITCH_STATUS_SUCCESS) {
|
||||
|
|
Loading…
Reference in New Issue