aboutsummaryrefslogtreecommitdiffstats
path: root/main/asterisk.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-14 22:09:20 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-14 22:09:20 +0000
commit4c5507d166332e73d2e7b63bd97a03c76172d923 (patch)
tree9bccdddefcc0defe7b34185794b77a9439806dcd /main/asterisk.c
parent4293ad87778af581f153f9f651126de6a20e7704 (diff)
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: http://svn.digium.com/svn/asterisk/trunk@69405 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/asterisk.c')
-rw-r--r--main/asterisk.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/main/asterisk.c b/main/asterisk.c
index 4f5ada9b0..2e469729b 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -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? */