Browse code

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)

Victor Seva authored on 30/07/2020 10:19:45
Showing 1 changed files
... ...
@@ -516,14 +516,11 @@ int send_publish( publ_info_t* publ )
516 516
 
517 517
 	if (dbmode==PUA_DB_ONLY)
518 518
 	{
519
-		if (publ->etag) {
520
-			memset(&dbpres, 0, sizeof(dbpres));
521
-			dbpres.pres_uri = &pres_uri;
522
-			dbpres.watcher_uri = &watcher_uri;
523
-			dbpres.extra_headers = &extra_headers;
524
-			presentity = get_record_puadb(publ->id, publ->etag,
525
-						      &dbpres, &res);
526
-		}
519
+		memset(&dbpres, 0, sizeof(dbpres));
520
+		dbpres.pres_uri = &pres_uri;
521
+		dbpres.watcher_uri = &watcher_uri;
522
+		dbpres.extra_headers = &extra_headers;
523
+		presentity = get_record_puadb(publ->id, publ->etag, &dbpres, &res);
527 524
 	}
528 525
 	else
529 526
 	{