FS-2216
This commit is contained in:
parent
049be82ae8
commit
812e5e9a26
|
@ -3425,7 +3425,7 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p
|
||||||
|
|
||||||
status = create_file(session, profile, record_macro, file_path, &message_len, SWITCH_TRUE, key_buf, buf);
|
status = create_file(session, profile, record_macro, file_path, &message_len, SWITCH_TRUE, key_buf, buf);
|
||||||
|
|
||||||
if ((status == SWITCH_STATUS_NOTFOUND)) {
|
if (status == SWITCH_STATUS_NOTFOUND) {
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3132,7 +3132,7 @@ void sofia_presence_handle_sip_i_subscribe(int status,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((sub_state == nua_substate_active)) {
|
if (sub_state == nua_substate_active) {
|
||||||
|
|
||||||
sstr = switch_mprintf("active;expires=%ld", exp_delta);
|
sstr = switch_mprintf("active;expires=%ld", exp_delta);
|
||||||
|
|
||||||
|
|
|
@ -2037,7 +2037,7 @@ void sofia_reg_handle_sip_r_challenge(int status,
|
||||||
if (!var_gateway && realm) {
|
if (!var_gateway && realm) {
|
||||||
char rb[512] = "";
|
char rb[512] = "";
|
||||||
char *p = (char *) realm;
|
char *p = (char *) realm;
|
||||||
while ((*p == '"')) {
|
while (*p == '"') {
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
switch_set_string(rb, p);
|
switch_set_string(rb, p);
|
||||||
|
|
|
@ -183,12 +183,6 @@ static JSBool socket_read_bytes(JSContext * cx, JSObject * obj, uintN argc, jsva
|
||||||
static JSBool socket_read(JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval)
|
static JSBool socket_read(JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval)
|
||||||
{
|
{
|
||||||
js_socket_obj_t *socket = JS_GetPrivate(cx, obj);
|
js_socket_obj_t *socket = JS_GetPrivate(cx, obj);
|
||||||
if (socket == NULL) {
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to find js object.\n");
|
|
||||||
return JS_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (argc >= 0) {
|
|
||||||
char *delimiter = "\n";
|
char *delimiter = "\n";
|
||||||
switch_status_t ret = SWITCH_STATUS_FALSE;
|
switch_status_t ret = SWITCH_STATUS_FALSE;
|
||||||
switch_size_t len = 1;
|
switch_size_t len = 1;
|
||||||
|
@ -196,14 +190,21 @@ static JSBool socket_read(JSContext * cx, JSObject * obj, uintN argc, jsval * ar
|
||||||
int can_run = TRUE;
|
int can_run = TRUE;
|
||||||
char tempbuf[2];
|
char tempbuf[2];
|
||||||
|
|
||||||
if (argc == 1)
|
if (socket == NULL) {
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to find js object.\n");
|
||||||
|
return JS_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (argc == 1) {
|
||||||
delimiter = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
|
delimiter = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (socket->read_buffer == 0) {
|
||||||
if (socket->read_buffer == 0)
|
|
||||||
socket->read_buffer = switch_core_alloc(socket->pool, socket->buffer_size);
|
socket->read_buffer = switch_core_alloc(socket->pool, socket->buffer_size);
|
||||||
|
}
|
||||||
|
|
||||||
socket->saveDepth = JS_SuspendRequest(cx);
|
socket->saveDepth = JS_SuspendRequest(cx);
|
||||||
|
|
||||||
while (can_run == TRUE) {
|
while (can_run == TRUE) {
|
||||||
ret = switch_socket_recv(socket->socket, tempbuf, &len);
|
ret = switch_socket_recv(socket->socket, tempbuf, &len);
|
||||||
if (ret != SWITCH_STATUS_SUCCESS)
|
if (ret != SWITCH_STATUS_SUCCESS)
|
||||||
|
@ -236,7 +237,7 @@ static JSBool socket_read(JSContext * cx, JSObject * obj, uintN argc, jsval * ar
|
||||||
socket->read_buffer[total_length] = 0;
|
socket->read_buffer[total_length] = 0;
|
||||||
*rval = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, socket->read_buffer));
|
*rval = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, socket->read_buffer));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return JS_TRUE;
|
return JS_TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3029,7 +3029,7 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
|
||||||
#ifdef ENABLE_ZRTP
|
#ifdef ENABLE_ZRTP
|
||||||
/* ZRTP Send */
|
/* ZRTP Send */
|
||||||
if (zrtp_on && !switch_test_flag(rtp_session, SWITCH_RTP_FLAG_PROXY_MEDIA)) {
|
if (zrtp_on && !switch_test_flag(rtp_session, SWITCH_RTP_FLAG_PROXY_MEDIA)) {
|
||||||
unsigned int sbytes = (int) bytes;
|
unsigned int sbytes = (unsigned int) bytes;
|
||||||
zrtp_status_t stat = zrtp_status_fail;
|
zrtp_status_t stat = zrtp_status_fail;
|
||||||
|
|
||||||
stat = zrtp_process_rtcp(other_rtp_session->zrtp_stream, (void *) &other_rtp_session->rtcp_send_msg, &sbytes);
|
stat = zrtp_process_rtcp(other_rtp_session->zrtp_stream, (void *) &other_rtp_session->rtcp_send_msg, &sbytes);
|
||||||
|
@ -3067,11 +3067,6 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bytes < 0) {
|
|
||||||
ret = (int) bytes;
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (bytes && rtp_session->recv_msg.header.version == 2 &&
|
if (bytes && rtp_session->recv_msg.header.version == 2 &&
|
||||||
!switch_test_flag(rtp_session, SWITCH_RTP_FLAG_PROXY_MEDIA) && !switch_test_flag(rtp_session, SWITCH_RTP_FLAG_UDPTL) &&
|
!switch_test_flag(rtp_session, SWITCH_RTP_FLAG_PROXY_MEDIA) && !switch_test_flag(rtp_session, SWITCH_RTP_FLAG_UDPTL) &&
|
||||||
|
|
Loading…
Reference in New Issue