]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Fixed Cairo's entry in the timezone files
authorSteve Underwood <steveu@coppice.org>
Wed, 22 Aug 2012 14:25:54 +0000 (22:25 +0800)
committerSteve Underwood <steveu@coppice.org>
Wed, 22 Aug 2012 14:25:54 +0000 (22:25 +0800)
Changed mod_spandsp so it tries to resolve timezone names like Asia/HongKong
to a POSIX timezone descriptor string, like other parts of FreeSwitch do.

conf/curl/autoload_configs/timezones.conf.xml
conf/insideout/autoload_configs/timezones.conf.xml
conf/sbc/autoload_configs/timezones.conf.xml
conf/vanilla/autoload_configs/timezones.conf.xml
src/include/switch_core.h
src/mod/applications/mod_spandsp/mod_spandsp_fax.c
src/switch_time.c

index 85c805ff25a0c7e9809848a4706d0940710ab56f..397e9a979ff6f53428ef3c9822d2b58e309e8163 100644 (file)
@@ -13,7 +13,7 @@
        <zone name="Africa/Blantyre" value="CAT-2" />
        <zone name="Africa/Brazzaville" value="WAT-1" />
        <zone name="Africa/Bujumbura" value="CAT-2" />
-       <zone name="Africa/Cairo" value="EEST" />
+       <zone name="Africa/Cairo" value="EET-2EEST,M4.5.5/1,M9.5.5/3" />
        <zone name="Africa/Casablanca" value="WET0" />
        <zone name="Africa/Ceuta" value="CET-1CEST,M3.5.0,M10.5.0/3" />
        <zone name="Africa/Conakry" value="GMT0" />
index 85c805ff25a0c7e9809848a4706d0940710ab56f..397e9a979ff6f53428ef3c9822d2b58e309e8163 100644 (file)
@@ -13,7 +13,7 @@
        <zone name="Africa/Blantyre" value="CAT-2" />
        <zone name="Africa/Brazzaville" value="WAT-1" />
        <zone name="Africa/Bujumbura" value="CAT-2" />
-       <zone name="Africa/Cairo" value="EEST" />
+       <zone name="Africa/Cairo" value="EET-2EEST,M4.5.5/1,M9.5.5/3" />
        <zone name="Africa/Casablanca" value="WET0" />
        <zone name="Africa/Ceuta" value="CET-1CEST,M3.5.0,M10.5.0/3" />
        <zone name="Africa/Conakry" value="GMT0" />
index 85c805ff25a0c7e9809848a4706d0940710ab56f..397e9a979ff6f53428ef3c9822d2b58e309e8163 100644 (file)
@@ -13,7 +13,7 @@
        <zone name="Africa/Blantyre" value="CAT-2" />
        <zone name="Africa/Brazzaville" value="WAT-1" />
        <zone name="Africa/Bujumbura" value="CAT-2" />
-       <zone name="Africa/Cairo" value="EEST" />
+       <zone name="Africa/Cairo" value="EET-2EEST,M4.5.5/1,M9.5.5/3" />
        <zone name="Africa/Casablanca" value="WET0" />
        <zone name="Africa/Ceuta" value="CET-1CEST,M3.5.0,M10.5.0/3" />
        <zone name="Africa/Conakry" value="GMT0" />
index 85c805ff25a0c7e9809848a4706d0940710ab56f..397e9a979ff6f53428ef3c9822d2b58e309e8163 100644 (file)
@@ -13,7 +13,7 @@
        <zone name="Africa/Blantyre" value="CAT-2" />
        <zone name="Africa/Brazzaville" value="WAT-1" />
        <zone name="Africa/Bujumbura" value="CAT-2" />
-       <zone name="Africa/Cairo" value="EEST" />
+       <zone name="Africa/Cairo" value="EET-2EEST,M4.5.5/1,M9.5.5/3" />
        <zone name="Africa/Casablanca" value="WET0" />
        <zone name="Africa/Ceuta" value="CET-1CEST,M3.5.0,M10.5.0/3" />
        <zone name="Africa/Conakry" value="GMT0" />
index 1fda42588ccb6e42b7d39a698810655dfa0f63d8..67ae2727aa2e886f364582df739c79e9ae50c81b 100644 (file)
@@ -2131,6 +2131,7 @@ SWITCH_DECLARE(void) switch_time_sync(void);
  \return The current epoch time 
 */
 SWITCH_DECLARE(time_t) switch_epoch_time_now(time_t *t);
+SWITCH_DECLARE(const char *) switch_lookup_timezone(const char *tz_name);
 SWITCH_DECLARE(switch_status_t) switch_strftime_tz(const char *tz, const char *format, char *date, size_t len, switch_time_t thetime);
 SWITCH_DECLARE(switch_status_t) switch_time_exp_tz_name(const char *tz, switch_time_exp_t *tm, switch_time_t thetime);
 SWITCH_DECLARE(void) switch_load_network_lists(switch_bool_t reload);
index 0b8f5d4f6103ed8829d54c237fef6a7ba34665e1..c15f9afe6787c8fc9b56f48c68c6a5633e50cc1d 100644 (file)
@@ -674,6 +674,7 @@ static switch_status_t spanfax_init(pvt_t *pvt, transport_mode_t trans_mode)
        t38_terminal_state_t *t38;
        t30_state_t *t30;
        const char *tmp;
+    const char *tz;
        int fec_entries = DEFAULT_FEC_ENTRIES;
        int fec_span = DEFAULT_FEC_SPAN;
 
@@ -844,8 +845,12 @@ static switch_status_t spanfax_init(pvt_t *pvt, transport_mode_t trans_mode)
        /* All the things which are common to audio and T.38 FAX setup */
        t30_set_tx_ident(t30, pvt->ident);
        t30_set_tx_page_header_info(t30, pvt->header);
-       if (pvt->timezone && pvt->timezone[0])
-               t30_set_tx_page_header_tz(t30, pvt->timezone);
+       if (pvt->timezone && pvt->timezone[0]) {
+               if ((tz = switch_lookup_timezone(pvt->timezone)))
+                       t30_set_tx_page_header_tz(t30, tz);
+               else
+                       t30_set_tx_page_header_tz(t30, pvt->timezone);
+       }
 
        t30_set_phase_e_handler(t30, phase_e_handler, pvt);
        t30_set_phase_d_handler(t30, phase_d_handler, pvt);
index 96e4ec9937d5dde9ad324ea8431c2f6e09c9d7a0..fb9fea1de008740b6f773251bbdc0bbeb2df568f 100644 (file)
@@ -1110,7 +1110,7 @@ typedef struct {
 static switch_timezones_list_t TIMEZONES_LIST = { 0 };
 static switch_event_node_t *NODE = NULL;
 
-const char *switch_lookup_timezone(const char *tz_name)
+SWITCH_DECLARE(const char *) switch_lookup_timezone(const char *tz_name)
 {
        char *value = NULL;