[sr-dev] [kamailio/kamailio] "flags" and "reg_delay" uacreg columns not read if database lacks DB_CAP_FETCH capability (#640)

AndyJRobinson notifications at github.com
Wed May 25 19:52:21 CEST 2016


In both 4.4.1 and master, the recently added "flags" and "reg_delay" columns are not read if the database lacks DB_CAP_FETCH capability. uac.reg_dump shows them as some large random values.

The issue is in uac_reg.c:uac_reg_load_db().

`	if (DB_CAPABILITY(reg_dbf, DB_CAP_FETCH)) {
		if(reg_dbf.query(reg_db_con, 0, 0, 0, db_cols, 0, 12, 0, 0) < 0)`

... so if the database has DB_CAP_FETCH capability, 12 columns are read; however, if not...

`	} else {
		if((ret=reg_dbf.query(reg_db_con, NULL, NULL, NULL, db_cols,
						0, 10, 0, &db_res))!=0
				|| RES_ROW_N(db_res)<=0 )
		{` 

only 10 columns are read, missing the last two (flags and reg_delay)

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/640
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20160525/15291b9b/attachment.html>


More information about the sr-dev mailing list