Merged revisions 69392 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r69392 | kpfleming | 2007-06-14 16:50:40 -0500 (Thu, 14 Jun 2007) | 2 lines

use ast_localtime() in every place localtime_r() was being used

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69405 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2007-06-14 22:09:20 +00:00
parent 66ec973c5c
commit 5fdba27ea2
21 changed files with 91 additions and 62 deletions

View File

@@ -365,11 +365,11 @@ static int handle_show_settings(int fd, int argc, char *argv[])
#if defined(HAVE_SYSINFO)
ast_cli(fd, " Min Free Memory: %ld MB\n", option_minmemfree);
#endif
if (localtime_r(&ast_startuptime, &tm)) {
if (ast_localtime(&ast_startuptime, &tm, NULL)) {
strftime(buf, sizeof(buf), "%H:%M:%S", &tm);
ast_cli(fd, " Startup time: %s\n", buf);
}
if (localtime_r(&ast_lastreloadtime, &tm)) {
if (ast_localtime(&ast_lastreloadtime, &tm, NULL)) {
strftime(buf, sizeof(buf), "%H:%M:%S", &tm);
ast_cli(fd, " Last reload time: %s\n", buf);
}
@@ -1864,7 +1864,7 @@ static char *cli_prompt(EditLine *el)
case 'd': /* date */
memset(&tm, 0, sizeof(tm));
time(&ts);
if (localtime_r(&ts, &tm))
if (ast_localtime(&ts, &tm, NULL))
strftime(p, sizeof(prompt) - strlen(prompt), "%Y-%m-%d", &tm);
break;
case 'h': /* hostname */
@@ -1921,7 +1921,7 @@ static char *cli_prompt(EditLine *el)
case 't': /* time */
memset(&tm, 0, sizeof(tm));
time(&ts);
if (localtime_r(&ts, &tm))
if (ast_localtime(&ts, &tm, NULL))
strftime(p, sizeof(prompt) - strlen(prompt), "%H:%M:%S", &tm);
break;
case '#': /* process console or remote? */