[mod_v8] Fix dead nested assignments
This commit is contained in:
parent
01844013a0
commit
6ef22a6f7d
|
@ -389,10 +389,9 @@ JS_EVENTHANDLER_FUNCTION_IMPL(SendEvent)
|
|||
if (session_uuid.length() > 0) {
|
||||
/* This is a session event */
|
||||
switch_core_session_t *session;
|
||||
switch_status_t status = SWITCH_STATUS_FALSE;
|
||||
|
||||
if ((session = switch_core_session_locate(session_uuid.c_str()))) {
|
||||
if ((status = switch_core_session_queue_private_event(session, event, SWITCH_FALSE)) == SWITCH_STATUS_SUCCESS) {
|
||||
if (switch_core_session_queue_private_event(session, event, SWITCH_FALSE) == SWITCH_STATUS_SUCCESS) {
|
||||
info.GetReturnValue().Set(true);
|
||||
} else {
|
||||
info.GetReturnValue().Set(false);
|
||||
|
|
|
@ -273,7 +273,6 @@ JS_ODBC_FUNCTION_IMPL(NumCols)
|
|||
JS_ODBC_FUNCTION_IMPL(NextRow)
|
||||
{
|
||||
HandleScope handle_scope(info.GetIsolate());
|
||||
int result = 0;
|
||||
bool tf = false;
|
||||
|
||||
if (switch_odbc_handle_get_state(_handle) != SWITCH_ODBC_STATE_CONNECTED) {
|
||||
|
@ -282,7 +281,7 @@ JS_ODBC_FUNCTION_IMPL(NextRow)
|
|||
}
|
||||
|
||||
if (_stmt) {
|
||||
if ((result = SQLFetch(_stmt) == SQL_SUCCESS)) {
|
||||
if (SQLFetch(_stmt) == SQL_SUCCESS) {
|
||||
tf = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1250,7 +1250,6 @@ JS_SESSION_FUNCTION_IMPL(WaitForMedia)
|
|||
HandleScope handle_scope(info.GetIsolate());
|
||||
switch_channel_t *channel;
|
||||
switch_time_t started;
|
||||
unsigned int elapsed;
|
||||
int32_t timeout = 60000;
|
||||
bool ret = true;
|
||||
|
||||
|
@ -1273,7 +1272,7 @@ JS_SESSION_FUNCTION_IMPL(WaitForMedia)
|
|||
}
|
||||
|
||||
for (;;) {
|
||||
if (((elapsed = (unsigned int) ((switch_micro_time_now() - started) / 1000)) > (switch_time_t) timeout)
|
||||
if (((/* Elapsed */(unsigned int)((switch_micro_time_now() - started) / 1000)) > (switch_time_t)timeout)
|
||||
|| switch_channel_down(channel)) {
|
||||
info.GetReturnValue().Set(false);
|
||||
break;
|
||||
|
@ -1297,7 +1296,6 @@ JS_SESSION_FUNCTION_IMPL(WaitForAnswer)
|
|||
HandleScope handle_scope(info.GetIsolate());
|
||||
switch_channel_t *channel;
|
||||
switch_time_t started;
|
||||
unsigned int elapsed;
|
||||
int32_t timeout = 60000;
|
||||
bool ret = true;
|
||||
|
||||
|
@ -1319,7 +1317,7 @@ JS_SESSION_FUNCTION_IMPL(WaitForAnswer)
|
|||
}
|
||||
|
||||
for (;;) {
|
||||
if (((elapsed = (unsigned int) ((switch_micro_time_now() - started) / 1000)) > (switch_time_t) timeout)
|
||||
if (((/* Elapsed */(unsigned int)((switch_micro_time_now() - started) / 1000)) > (switch_time_t)timeout)
|
||||
|| switch_channel_down(channel)) {
|
||||
info.GetReturnValue().Set(false);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue