mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 09:36:46 +00:00
add mod_rss
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1551 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -370,7 +370,8 @@ static const char *state_names[] = {
|
||||
"CS_LOOPBACK",
|
||||
"CS_HOLD",
|
||||
"CS_HANGUP",
|
||||
"CS_DONE"
|
||||
"CS_DONE",
|
||||
NULL
|
||||
};
|
||||
|
||||
SWITCH_DECLARE(const char *) switch_channel_state_name(switch_channel_state_t state)
|
||||
@@ -378,6 +379,19 @@ SWITCH_DECLARE(const char *) switch_channel_state_name(switch_channel_state_t st
|
||||
return state_names[state];
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_channel_state_t) switch_channel_name_state(char *name)
|
||||
{
|
||||
uint32_t x = 0;
|
||||
for(x = 0; state_names[x]; x++) {
|
||||
if (!strcasecmp(state_names[x], name)) {
|
||||
return (switch_channel_state_t) x;
|
||||
}
|
||||
}
|
||||
|
||||
return CS_DONE;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_channel_state_t) switch_channel_perform_set_state(switch_channel_t *channel,
|
||||
const char *file,
|
||||
const char *func,
|
||||
|
Reference in New Issue
Block a user