Slightly optimize ast_devstate_str and rename global functions devstate2str and config_text_file_save to have an ast_ prefix

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@154260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2008-11-04 18:47:20 +00:00
parent a57a3cbf19
commit 2cc8e25222
9 changed files with 43 additions and 60 deletions

View File

@@ -1007,9 +1007,9 @@ static int handle_statechange(void *datap)
}
if (found)
ast_debug(1, "Device '%s' changed to state '%d' (%s)\n", sc->dev, sc->state, devstate2str(sc->state));
ast_debug(1, "Device '%s' changed to state '%d' (%s)\n", sc->dev, sc->state, ast_devstate2str(sc->state));
else
ast_debug(3, "Device '%s' changed to state '%d' (%s) but we don't care because they're not a member of any queue.\n", sc->dev, sc->state, devstate2str(sc->state));
ast_debug(3, "Device '%s' changed to state '%d' (%s) but we don't care because they're not a member of any queue.\n", sc->dev, sc->state, ast_devstate2str(sc->state));
ast_free(sc);
return 0;
@@ -5692,7 +5692,7 @@ static char *__queues_show(struct mansession *s, int fd, int argc, char **argv)
mem->dynamic ? " (dynamic)" : "",
mem->realtime ? " (realtime)" : "",
mem->paused ? " (paused)" : "",
devstate2str(mem->status));
ast_devstate2str(mem->status));
if (mem->calls)
ast_str_append(&out, 0, " has taken %d calls (last was %ld secs ago)",
mem->calls, (long) (time(NULL) - mem->lastcall));