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
Module: kamailio
Branch: master
Commit: 5ad94e15c2de70c2e0054ed55e8b8b25e27ad76e
URL: https://github.com/kamailio/kamailio/commit/5ad94e15c2de70c2e0054ed55e8b8b2…
Author: AndreasHuber-CH <andreas.huber(a)nagra.com>
Committer: AndreasHuber-CH <andreas.huber(a)nagra.com>
Date: 2016-05-25T15:44:01+02:00
auth_radius: add NULL for ha1 parameter in auth_api.post_auth
auth api was updated to support Authentication-Info header and requires
now the ha1 value in post_auth. NULL is used (because I didn't find the ha1 value)
which makes that the new feature cannot be used with this module.
---
Modified: modules/auth_radius/authorize.c
---
Diff: https://github.com/kamailio/kamailio/commit/5ad94e15c2de70c2e0054ed55e8b8b2…
Patch: https://github.com/kamailio/kamailio/commit/5ad94e15c2de70c2e0054ed55e8b8b2…
---
diff --git a/modules/auth_radius/authorize.c b/modules/auth_radius/authorize.c
index cb26693..18dff11 100644
--- a/modules/auth_radius/authorize.c
+++ b/modules/auth_radius/authorize.c
@@ -172,7 +172,7 @@ static inline int authorize(struct sip_msg* _msg, pv_elem_t* _realm,
}
if (res == 1) {
- switch(auth_api.post_auth(_msg, h)) {
+ switch(auth_api.post_auth(_msg, h, NULL)) {
default:
BUG("unexpected reply '%d'.\n",
auth_api.pre_auth(_msg, &domain, _hftype, &h, NULL));
Module: kamailio
Branch: master
Commit: e2ee8b5741ce2d9dc2613c698e5b7002c2f19e4f
URL: https://github.com/kamailio/kamailio/commit/e2ee8b5741ce2d9dc2613c698e5b700…
Author: AndreasHuber-CH <andreas.huber(a)nagra.com>
Committer: AndreasHuber-CH <andreas.huber(a)nagra.com>
Date: 2016-05-25T15:30:03+02:00
auth: add support for Authentication-Info header
Add an option to include an Authentication-Info header in the response to a successful authentication.
The header can be enabled with the parameter 'add_authinfo_hdr' module parameter.
The implementation follows RFC2617.
The Authentication-Info header is added inside the function post_auth of the auth api.
The parameter HA1 had to be added to the post_auth api function which requires an
update in all auth_* modules that use the module auth api.
---
Modified: modules/auth/api.c
Modified: modules/auth/api.h
Modified: modules/auth/auth_mod.c
Modified: modules/auth/auth_mod.h
Modified: modules/auth/challenge.c
Modified: modules/auth/challenge.h
Modified: modules/auth/doc/auth_params.xml
Modified: modules/auth/nonce.c
Modified: modules/auth/rfc2617.c
Modified: modules/auth/rfc2617_sha256.c
---
Diff: https://github.com/kamailio/kamailio/commit/e2ee8b5741ce2d9dc2613c698e5b700…
Patch: https://github.com/kamailio/kamailio/commit/e2ee8b5741ce2d9dc2613c698e5b700…