From: Anthony Minessale Date: Thu, 23 Feb 2012 22:55:54 +0000 (-0600) Subject: allow publish with no contact X-Git-Tag: v1.2-rc1~19^2^2~68^2~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b843911c3577e02a9e77d32ff4905d8a502cb093;p=thirdparty%2Ffreeswitch.git allow publish with no contact --- diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index 6b0442eb76..1a4196e2ff 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -3737,7 +3737,7 @@ void sofia_presence_handle_sip_i_publish(nua_t *nua, sofia_profile_t *profile, n char expstr[30] = ""; long exp = 0, exp_delta = 3600; char *pd_dup = NULL; - int count = 1, sub_count = 0; + int count = 1, sub_count = 1; char *contact_str; int open = 1; sofia_nat_parse_t np = { { 0 } }; @@ -3802,9 +3802,8 @@ void sofia_presence_handle_sip_i_publish(nua_t *nua, sofia_profile_t *profile, n if (sofia_test_pflag(profile, PFLAG_MULTIREG) && !open) { count = sofia_reg_reg_count(profile, from_user, from_host); + sub_count = sofia_presence_contact_count(profile, contact_str); } - - sub_count = sofia_presence_contact_count(profile, contact_str); /* if (count > 1) let's not and say we did or all the clients who subscribe to their own presence will think they selves is offline */