From 5083c78736ca3a145546baf1d8cea00b24f886cf Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Sat, 17 Nov 2007 04:10:35 +0000 Subject: [PATCH] fix for MODAPP-51 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6318 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/sofia_presence.c | 14 ++++++++++++-- src/mod/endpoints/mod_sofia/sofia_reg.c | 3 ++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index 94a7b94ba9..f914c39cc7 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -809,7 +809,7 @@ void sofia_presence_handle_sip_i_subscribe(int status, from_user, from_host, to_user, - to_host, event, proto + to_host, event ); assert(sql != NULL); @@ -846,7 +846,7 @@ void sofia_presence_handle_sip_i_subscribe(int status, switch_safe_free(sstr); - if ((sql = switch_mprintf("select * from sip_subscriptions where sip_user='%q' and sip_host='%q'", to_user, to_host, to_user, to_host))) { + if ((sql = switch_mprintf("select * from sip_subscriptions where sip_user='%q' and sip_host='%q'", to_user, to_host))) { sofia_glue_execute_sql_callback(profile, SWITCH_FALSE, profile->ireg_mutex, @@ -1145,3 +1145,13 @@ void sofia_presence_set_chat_hash(private_object_t *tech_pvt, sip_t const *sip) switch_core_hash_insert(tech_pvt->profile->chat_hash, tech_pvt->hash_key, tech_pvt); } +/* For Emacs: + * Local Variables: + * mode:c + * indent-tabs-mode:t + * tab-width:4 + * c-basic-offset:4 + * End: + * For VIM: + * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: + */ diff --git a/src/mod/endpoints/mod_sofia/sofia_reg.c b/src/mod/endpoints/mod_sofia/sofia_reg.c index 706cb7cbbc..e7f7425917 100644 --- a/src/mod/endpoints/mod_sofia/sofia_reg.c +++ b/src/mod/endpoints/mod_sofia/sofia_reg.c @@ -542,7 +542,7 @@ uint8_t sofia_reg_handle_register(nua_t * nua, sofia_profile_t *profile, nua_han sql = NULL; } - if ((sql = switch_mprintf("delete from sip_registrations where call_id='%q'", to_user, to_host, call_id))) { + if ((sql = switch_mprintf("delete from sip_registrations where call_id='%q'", call_id))) { sofia_glue_execute_sql(profile, SWITCH_FALSE, sql, profile->ireg_mutex); switch_safe_free(sql); sql = NULL; @@ -1112,3 +1112,4 @@ switch_status_t sofia_reg_add_gateway(char *key, sofia_gateway_t *gateway) +