Skip to content

Commit

Permalink
presence : fix fast_notify usage
Browse files Browse the repository at this point in the history
fast_notify not used when pres_notifier_processes > 0
  • Loading branch information
lazedo committed Mar 11, 2017
1 parent 70bf0ef commit 0411c07
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/modules/presence/subscribe.c
Expand Up @@ -1114,7 +1114,7 @@ int handle_subscribe(struct sip_msg* msg, str watcher_user, str watcher_domain)
goto error;
}

if (pres_notifier_processes > 0 && pa_dbf.start_transaction)
if (pres_notifier_processes > 0 && !send_fast_notify && pa_dbf.start_transaction)
{
if (pa_dbf.use_table(pa_db, &active_watchers_table) < 0)
{
Expand Down Expand Up @@ -1241,7 +1241,7 @@ int handle_subscribe(struct sip_msg* msg, str watcher_user, str watcher_domain)
LM_DBG("subscription status= %s - %s\n", get_status_str(subs.status),
(found==0)?"inserted":"found in watcher table");

if (pres_notifier_processes > 0)
if (pres_notifier_processes > 0 && !send_fast_notify)
{
if (update_subscription_notifier(msg, &subs, to_tag_gen,
&sent_reply) < 0)
Expand All @@ -1255,7 +1255,8 @@ int handle_subscribe(struct sip_msg* msg, str watcher_user, str watcher_domain)
LM_ERR("in update_subscription\n");
goto error;
}
if (pres_notifier_processes > 0 && pa_dbf.end_transaction)

if (pres_notifier_processes > 0 && !send_fast_notify && pa_dbf.end_transaction)
{
if (pa_dbf.end_transaction(pa_db) < 0)
{
Expand Down

0 comments on commit 0411c07

Please sign in to comment.