|
@@ -207,6 +207,7 @@ void publ_cback_func(struct cell *t, int type, struct tmcb_params *ps)
|
|
|
db1_res_t *res=NULL;
|
|
|
ua_pres_t dbpres;
|
|
|
str pres_uri={0,0}, watcher_uri={0,0}, extra_headers={0,0};
|
|
|
+ int end_transaction = 1;
|
|
|
|
|
|
memset(&dbpres, 0, sizeof(dbpres));
|
|
|
dbpres.pres_uri = &pres_uri;
|
|
@@ -275,6 +276,17 @@ void publ_cback_func(struct cell *t, int type, struct tmcb_params *ps)
|
|
|
publ.extra_headers= hentity->extra_headers;
|
|
|
publ.cb_param= hentity->cb_param;
|
|
|
|
|
|
+ if (dbmode == PUA_DB_ONLY && pua_dbf.end_transaction)
|
|
|
+ {
|
|
|
+ if (pua_dbf.end_transaction(pua_db) < 0)
|
|
|
+ {
|
|
|
+ LM_ERR("in end_transaction\n");
|
|
|
+ goto error;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ end_transaction = 0;
|
|
|
+
|
|
|
if(send_publish(&publ)< 0)
|
|
|
{
|
|
|
LM_ERR("when trying to send PUBLISH\n");
|
|
@@ -432,7 +444,7 @@ done:
|
|
|
|
|
|
if (res) free_results_puadb(res);
|
|
|
|
|
|
- if (dbmode == PUA_DB_ONLY && pua_dbf.end_transaction)
|
|
|
+ if (dbmode == PUA_DB_ONLY && pua_dbf.end_transaction && end_transaction)
|
|
|
{
|
|
|
if (pua_dbf.end_transaction(pua_db) < 0)
|
|
|
{
|