fix race on shutdown

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7444 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-01-31 16:19:09 +00:00
parent 512f995558
commit a503d59690

View File

@ -414,8 +414,11 @@ static void pres_event_handler(switch_event_t *event)
char *rpid = switch_event_get_header(event, "rpid"); char *rpid = switch_event_get_header(event, "rpid");
char *type = switch_event_get_header(event, "event_subtype"); char *type = switch_event_get_header(event, "event_subtype");
char *sql; char *sql;
if (globals.running != 1) {
return;
}
if (!proto) { if (!proto) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Missing 'proto' header\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Missing 'proto' header\n");
return; return;
@ -557,6 +560,9 @@ static void roster_event_handler(switch_event_t *event)
void *val; void *val;
char *sql; char *sql;
if (globals.running != 1) {
return;
}
if (status && !strcasecmp(status, "n/a")) { if (status && !strcasecmp(status, "n/a")) {
status = NULL; status = NULL;