fix missing name and potential segfault in gateway status

This commit is contained in:
Michael Jerris 2010-11-05 20:24:31 -04:00
parent e0c37c1f6e
commit 40ac860aaa
1 changed files with 3 additions and 0 deletions

View File

@ -2293,11 +2293,14 @@ static const char *sofia_state_names[] = {
"FAIL_WAIT",
"EXPIRED",
"NOREG",
"TIMEOUT",
NULL
};
const char *sofia_state_string(int state)
{
if (state >= REG_STATE_LAST) return "";
return sofia_state_names[state];
}