|
@@ -893,6 +893,12 @@ static void timer_send_full_state_notifies(int round)
|
|
|
goto done;
|
|
|
}
|
|
|
|
|
|
+ if (db_begin(&rls_dbf, rls_db) < 0)
|
|
|
+ {
|
|
|
+ LM_ERR("in BEGIN\n");
|
|
|
+ goto done;
|
|
|
+ }
|
|
|
+
|
|
|
/* Step 1: Find rls_watchers that require full-state notification */
|
|
|
if (rls_dbf.query(rls_db, query_cols, 0, query_vals, result_cols,
|
|
|
1, n_result_cols, 0, &result) < 0)
|
|
@@ -912,6 +918,12 @@ static void timer_send_full_state_notifies(int round)
|
|
|
goto done;
|
|
|
}
|
|
|
|
|
|
+ if (db_commit(&rls_dbf, rls_db) < 0)
|
|
|
+ {
|
|
|
+ LM_ERR("in COMMIT\n");
|
|
|
+ goto done;
|
|
|
+ }
|
|
|
+
|
|
|
/* Step 3: Full-state notify each watcher we found */
|
|
|
rows = RES_ROWS(result);
|
|
|
for (i = 0; i < RES_ROW_N(result); i++)
|
|
@@ -1025,6 +1037,12 @@ static void timer_send_update_notifies(int round)
|
|
|
goto done;
|
|
|
}
|
|
|
|
|
|
+ if (db_begin(&rlpres_dbf, rlpres_db) < 0)
|
|
|
+ {
|
|
|
+ LM_ERR("in BEGIN\n");
|
|
|
+ goto error;
|
|
|
+ }
|
|
|
+
|
|
|
if(rlpres_dbf.query(rlpres_db, query_cols, 0, query_vals, result_cols,
|
|
|
1, n_result_cols, &str_rlsubs_did_col, &result)< 0)
|
|
|
{
|
|
@@ -1042,6 +1060,12 @@ static void timer_send_update_notifies(int round)
|
|
|
goto error;
|
|
|
}
|
|
|
|
|
|
+ if (db_commit(&rlpres_dbf, rlpres_db) < 0)
|
|
|
+ {
|
|
|
+ LM_ERR("in COMMIT\n");
|
|
|
+ goto error;
|
|
|
+ }
|
|
|
+
|
|
|
send_notifies(result, did_col, resource_uri_col, auth_state_col, reason_col,
|
|
|
pres_state_col, content_type_col);
|
|
|
error:
|