mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-14 16:21:57 +00:00
handle some errors on missing db handle conditions
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@17136 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -3232,7 +3232,10 @@ SWITCH_STANDARD_API(show_function)
|
||||
switch_core_flag_t cflags = switch_core_flags();
|
||||
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
||||
|
||||
switch_core_db_handle(&db);
|
||||
if (switch_core_db_handle(&db) != SWITCH_STATUS_SUCCESS) {
|
||||
stream->write_function(stream, "%s", "-ERR Databse Error!\n");
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
holder.justcount = 0;
|
||||
|
||||
|
||||
@@ -358,7 +358,9 @@ SWITCH_STANDARD_APP(eavesdrop_function)
|
||||
char terminator;
|
||||
switch_status_t status;
|
||||
|
||||
switch_core_db_handle(&db);
|
||||
if (switch_core_db_handle(&db) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Database Error!\n");
|
||||
}
|
||||
|
||||
while (switch_channel_ready(channel)) {
|
||||
for (x = 0; x < MAX_SPY; x++) {
|
||||
|
||||
@@ -1356,7 +1356,9 @@ void do_index(switch_stream_handle_t *stream)
|
||||
struct holder holder;
|
||||
char *errmsg;
|
||||
|
||||
switch_core_db_handle(&db);
|
||||
if (switch_core_db_handle(&db) != SWITCH_STATUS_SUCCESS) {
|
||||
return;
|
||||
}
|
||||
|
||||
holder.host = switch_event_get_header(stream->param_event, "http-host");
|
||||
holder.port = switch_event_get_header(stream->param_event, "http-port");
|
||||
|
||||
Reference in New Issue
Block a user