提交 9fc927a8 authored 作者: Michael Jerris's avatar Michael Jerris

move mod_timezone functions into core (part 1/2)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9736 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 973faab4
...@@ -1645,6 +1645,7 @@ SWITCH_DECLARE(void) switch_core_memory_reclaim_all(void); ...@@ -1645,6 +1645,7 @@ SWITCH_DECLARE(void) switch_core_memory_reclaim_all(void);
SWITCH_DECLARE(void) switch_core_setrlimits(void); SWITCH_DECLARE(void) switch_core_setrlimits(void);
SWITCH_DECLARE(void) switch_time_sync(void); SWITCH_DECLARE(void) switch_time_sync(void);
SWITCH_DECLARE(time_t) switch_timestamp(time_t *t); SWITCH_DECLARE(time_t) switch_timestamp(time_t *t);
SWITCH_DECLARE(void) switch_tztime(const time_t * const timep, const char *tzstring, struct tm * const tmp );
SWITCH_DECLARE(void) switch_load_network_lists(switch_bool_t reload); SWITCH_DECLARE(void) switch_load_network_lists(switch_bool_t reload);
SWITCH_DECLARE(switch_bool_t) switch_check_network_list_ip_token(const char *ip_str, const char *list_name, const char **token); SWITCH_DECLARE(switch_bool_t) switch_check_network_list_ip_token(const char *ip_str, const char *list_name, const char **token);
#define switch_check_network_list_ip(_ip_str, _list_name) switch_check_network_list_ip_token(_ip_str, _list_name, NULL) #define switch_check_network_list_ip(_ip_str, _list_name) switch_check_network_list_ip_token(_ip_str, _list_name, NULL)
......
BASE=../../../..
LOCAL_SOURCES=localtime_find.c
LOCAL_OBJS=localtime_find.o
include $(BASE)/build/modmake.rules
...@@ -144,26 +144,6 @@ ...@@ -144,26 +144,6 @@
<References> <References>
</References> </References>
<Files> <Files>
<File
RelativePath=".\localtime_find.c"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
DisableSpecificWarnings="6385"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
DisableSpecificWarnings="6385"
/>
</FileConfiguration>
</File>
<File <File
RelativePath=".\mod_timezone.c" RelativePath=".\mod_timezone.c"
> >
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
*/ */
#include <switch.h> #include <switch.h>
#include "mod_timezone.h"
/* /*
This converts a struct tm to a switch_time_exp_t This converts a struct tm to a switch_time_exp_t
...@@ -164,7 +163,7 @@ SWITCH_STANDARD_API(strftime_tz_api_function) ...@@ -164,7 +163,7 @@ SWITCH_STANDARD_API(strftime_tz_api_function)
} }
if (tzdef) { /* The lookup of the zone may fail. */ if (tzdef) { /* The lookup of the zone may fail. */
tztime( &timep, tzdef, &tm ); switch_tztime( &timep, tzdef, &tm );
tm2switchtime( &tm, &stm ); tm2switchtime( &tm, &stm );
switch_strftime(date, &retsize, sizeof(date), switch_strlen_zero(format) ? "%Y-%m-%d %T" : format, &stm); switch_strftime(date, &retsize, sizeof(date), switch_strlen_zero(format) ? "%Y-%m-%d %T" : format, &stm);
stream->write_function(stream, "%s", date); stream->write_function(stream, "%s", date);
......
/*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
*
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is FreeSWITCH mod_timezone.
*
* The Initial Developer of the Original Code is
* Massimo Cetra <devel@navynet.it>
* Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved.
*
* mod_timezone.c -- Access to timezone informations and time string formatting
*
*/
void tztime (
const time_t * const timep,
const char *tzstring,
struct tm * const tmp
);
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论