From 7b7602ac795cdf0f1302cca39b1648f47c8cc7da Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Thu, 30 Jul 2020 12:19:45 +0200 Subject: [PATCH] pua: fix send_publish() behavior on PUA_DB_ONLY * dialog PUBLISH was missing SIP-If-Mach * pua was inserting a new record for every dialog state fixes #2414 (cherry picked from commit da7f7ef082e28f81893ec06081358a9f88571bcc) --- src/modules/pua/send_publish.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/modules/pua/send_publish.c b/src/modules/pua/send_publish.c index 1c9d8ed12bd..fc9af799f84 100644 --- a/src/modules/pua/send_publish.c +++ b/src/modules/pua/send_publish.c @@ -516,14 +516,11 @@ int send_publish( publ_info_t* publ ) if (dbmode==PUA_DB_ONLY) { - if (publ->etag) { - memset(&dbpres, 0, sizeof(dbpres)); - dbpres.pres_uri = &pres_uri; - dbpres.watcher_uri = &watcher_uri; - dbpres.extra_headers = &extra_headers; - presentity = get_record_puadb(publ->id, publ->etag, - &dbpres, &res); - } + memset(&dbpres, 0, sizeof(dbpres)); + dbpres.pres_uri = &pres_uri; + dbpres.watcher_uri = &watcher_uri; + dbpres.extra_headers = &extra_headers; + presentity = get_record_puadb(publ->id, publ->etag, &dbpres, &res); } else {