From 7cc7ce29362bc4ce2455310f12feeee60241f52f Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Fri, 11 Jan 2008 01:03:51 +0000 Subject: [PATCH] revert whoops git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7167 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- conf/directory/default/1000.xml | 12 ------------ src/mod/endpoints/mod_sofia/sofia_presence.c | 16 ++++------------ 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/conf/directory/default/1000.xml b/conf/directory/default/1000.xml index 408b3b3582..d230325c4c 100644 --- a/conf/directory/default/1000.xml +++ b/conf/directory/default/1000.xml @@ -1,17 +1,5 @@ - - - - - - - - - - - - diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index e649455d74..e579355d28 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -186,7 +186,7 @@ char *sofia_presence_translate_rpid(char *in, char *ext) void sofia_presence_mwi_event_handler(switch_event_t *event) { - char *account, *registered_account, *dup_account, *yn, *host, *user; + char *account, *dup_account, *yn, *host, *user; char *sql; sofia_profile_t *profile = NULL; switch_stream_handle_t stream = { 0 }; @@ -195,9 +195,7 @@ void sofia_presence_mwi_event_handler(switch_event_t *event) switch_assert(event != NULL); - registered_account = switch_event_get_header(event, "registered-message-account"); - - if(!(account = switch_event_get_header(event, "mwi-message-account"))) { + if (!(account = switch_event_get_header(event, "mwi-message-account"))) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Missing required Header 'MWI-Message-Account'\n"); return; } @@ -206,11 +204,8 @@ void sofia_presence_mwi_event_handler(switch_event_t *event) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Missing required Header 'MWI-Messages-Waiting'\n"); return; } - if (!switch_strlen_zero(registered_account)) { - dup_account = strdup(registered_account); - } else { - dup_account = strdup(account); - } + + dup_account = strdup(account); switch_assert(dup_account != NULL); sofia_glue_get_user_host(dup_account, &user, &host); @@ -225,13 +220,10 @@ void sofia_presence_mwi_event_handler(switch_event_t *event) if (!strncasecmp(hp->name, "mwi-", 4)) { char *tmp = NULL; char *value = hp->value; - if (!strcasecmp(hp->name, "mwi-message-account") && strncasecmp(hp->value, "sip:", 4)) { tmp = switch_mprintf("sip:%s", hp->value); value = tmp; } - - stream.write_function(&stream, "%s: %s\r\n", hp->name + 4, value); switch_safe_free(tmp); }