remove stuff from the db on unload

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9351 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-08-22 17:18:26 +00:00
parent adcd836b5b
commit 5708d0b6bd
1 changed files with 9 additions and 0 deletions

View File

@ -355,6 +355,15 @@ static void core_event_handler(switch_event_t *event)
}
break;
}
case SWITCH_EVENT_MODULE_UNLOAD:
{
const char *type = switch_event_get_header_nil(event, "type");
const char *name = switch_event_get_header_nil(event, "name");
if (!switch_strlen_zero(type) && !switch_strlen_zero(name)) {
sql = switch_mprintf("delete from interfaces where type='%q' and name='%q'", type, name);
}
break;
}
default:
break;
}