puuid = strdup((char *)cmd);
+ switch_assert(puuid);
+
if ((descriptor = strchr(puuid, ' '))) {
*descriptor++ = '\0';
}
return SWITCH_STATUS_SUCCESS;
}
- spandsp_tdd_decode_session(psession);
+ status = spandsp_tdd_decode_session(psession);
if (status == SWITCH_STATUS_SUCCESS) {
stream->write_function(stream, "+OK started\n");
puuid = strdup((char *)cmd);
+ switch_assert(puuid);
+
if ((text = strchr(puuid, ' '))) {
*text++ = '\0';
}
/* add to timer thread processing */
if (!add_pvt(pvt)) {
- if (channel) {
- switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
- }
+ switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
}
span_log_set_message_handler(t38_terminal_get_logging_state(t38), mod_spandsp_log_message, pvt->session);
static t38_mode_t configure_t38(pvt_t *pvt)
{
- switch_core_session_t *session = pvt->session;
- switch_channel_t *channel = switch_core_session_get_channel(session);
- switch_t38_options_t *t38_options = switch_channel_get_private(channel, "t38_options");
+ switch_core_session_t *session;
+ switch_channel_t *channel;
+ switch_t38_options_t *t38_options;
int method = 2;
- if (!t38_options || !pvt || !pvt->t38_core) {
+ switch_assert(pvt && pvt->session);
+ session = pvt->session;
+ channel = switch_core_session_get_channel(session);
+ t38_options = switch_channel_get_private(channel, "t38_options");
+
+ if (!t38_options || !pvt->t38_core) {
pvt->t38_mode = T38_MODE_REFUSED;
return pvt->t38_mode;
}
return SWITCH_STATUS_FALSE;
}
- if (!cont && !(cont = switch_core_session_alloc(session, sizeof(*cont)))) {
+ if (!(cont = switch_core_session_alloc(session, sizeof(*cont)))) {
return SWITCH_STATUS_MEMERR;
}
case SWITCH_MESSAGE_INDICATE_RINGING:
break;
case SWITCH_MESSAGE_INDICATE_BRIDGE:
- mod_spandsp_indicate_data(session, SWITCH_FALSE, SWITCH_TRUE);
- break;
case SWITCH_MESSAGE_INDICATE_UNBRIDGE:
mod_spandsp_indicate_data(session, SWITCH_FALSE, SWITCH_TRUE);
break;