Browse code

uac: fix crash related to uacreg HA1 addition, commit 9b501c4945

- fix crash related to uacreg HA1 addition, commit 9b501c4945 (GH #2076)
- it's also necessary to add the new column to the queries

Henning Westerholt authored on 29/09/2019 20:57:53
Showing 1 changed files
... ...
@@ -1364,7 +1364,7 @@ int uac_reg_load_db(void)
1364 1364
 	}
1365 1365
 
1366 1366
 	if (DB_CAPABILITY(reg_dbf, DB_CAP_FETCH)) {
1367
-		if(reg_dbf.query(reg_db_con, 0, 0, 0, db_cols, 0, 13, 0, 0) < 0)
1367
+		if(reg_dbf.query(reg_db_con, 0, 0, 0, db_cols, 0, 14, 0, 0) < 0)
1368 1368
 		{
1369 1369
 			LM_ERR("Error while querying db\n");
1370 1370
 			return -1;
... ...
@@ -1383,7 +1383,7 @@ int uac_reg_load_db(void)
1383 1383
 		}
1384 1384
 	} else {
1385 1385
 		if((ret=reg_dbf.query(reg_db_con, NULL, NULL, NULL, db_cols,
1386
-						0, 13, 0, &db_res))!=0
1386
+						0, 14, 0, &db_res))!=0
1387 1387
 				|| RES_ROW_N(db_res)<=0 )
1388 1388
 		{
1389 1389
 			reg_dbf.free_result(reg_db_con, db_res);
... ...
@@ -1502,7 +1502,7 @@ int uac_reg_db_refresh(str *pl_uuid)
1502 1502
 	db_vals[0].val.str_val.len = pl_uuid->len;
1503 1503
 
1504 1504
 	if((ret=reg_dbf.query(reg_db_con, db_keys, NULL, db_vals, db_cols,
1505
-					1 /*nr keys*/, 13 /*nr cols*/, 0, &db_res))!=0
1505
+					1 /*nr keys*/, 14 /*nr cols*/, 0, &db_res))!=0
1506 1506
 			|| RES_ROW_N(db_res)<=0 )
1507 1507
 	{
1508 1508
 		reg_dbf.free_result(reg_db_con, db_res);