Module: kamailio
Branch: master
Commit: 93f74c228bec1ad291d0ef5c8353747315556f7d
URL: https://github.com/kamailio/kamailio/commit/93f74c228bec1ad291d0ef5c8353747…
Author: Dmitriy N. Borisov <bordmi(a)rarus.ru>
Committer: Dmitriy N. Borisov <bordmi(a)rarus.ru>
Date: 2015-01-22T14:57:58+03:00
Comments style correction
---
Modified: modules/auth_radius/sterman.c
---
Diff: https://github.com/kamailio/kamailio/commit/93f74c228bec1ad291d0ef5c8353747…
Patch: https://github.com/kamailio/kamailio/commit/93f74c228bec1ad291d0ef5c8353747…
---
diff --git a/modules/auth_radius/sterman.c b/modules/auth_radius/sterman.c
index 5b51866..da644dc 100644
--- a/modules/auth_radius/sterman.c
+++ b/modules/auth_radius/sterman.c
@@ -89,37 +89,37 @@ static inline int extract_avp(VALUE_PAIR* vp, unsigned short *flags,
r = NULL;
errno = 0;
if ( p == vp->strvalue && q ) {
- // int name and str value
+ /* int name and str value */
*flags |= AVP_VAL_STR;
name->n = strtol(++p,&q,10);
value->s.s = ++q;
value->s.len = strlen(q);
} else if ( p && !r && p > vp->strvalue && !q ) {
- // str name and int value
+ /* str name and int value */
*flags |= AVP_NAME_STR;
name->s.len = p - vp->strvalue;
name->s.s = vp->strvalue;
value->n = strtol(++p,&r,10);
} else if ( p && p != r && !q ) {
- // int name and int vale
+ /* int name and int vale */
name->n = strtol(++p,&q,10);
value->n = strtol(++r,&q,10);
} else if ( (!p || p > q) && q ) {
- // str name and str value
+ /* str name and str value */
*flags |= AVP_VAL_STR|AVP_NAME_STR;
name->s.len = q - vp->strvalue;
name->s.s = vp->strvalue;
value->s.len = strlen(++q);
value->s.s = q;
- } else // error - unknown
+ } else /* error - unknown */
return 0;
if ( errno != 0 )
return 0;
} else if (vp->type == PW_TYPE_STRING) {
*flags |= AVP_VAL_STR|AVP_NAME_STR;
- // if start of value is the name of value
+ /* if start of value is the name of value */
if (vp->strvalue == strstr(vp->strvalue,vp->name))
- // then get value after name + one char delimiter
+ /* then get value after name + one char delimiter */
p = vp->strvalue + strlen(vp->name) + sizeof(char);
else
p = vp->strvalue;
Module: kamailio
Branch: master
Commit: e415044acaf6fa15e20d0b90b34227fb0e167bea
URL: https://github.com/kamailio/kamailio/commit/e415044acaf6fa15e20d0b90b34227f…
Author: Dmitriy N. Borisov <bordmi(a)rarus.ru>
Committer: Dmitriy N. Borisov <bordmi(a)rarus.ru>
Date: 2015-01-19T02:19:37+03:00
Improoved working with RADIUS AV pairs
- added modparam import_all_avp parameter (int, true if not null)
- reading all RADIUS AV-pairs to kamailio avp (not only SIP-AVP, if import_all_avp set to true)
- skiping name part of value (example: from RADIUS we recieve name - h323-x-header, value -
"h323-x-header=blah-blah-blah", in kamailio we have name
h323-x-header, value - "blah-blah-blah"), only for non SIP-AVP
---
Modified: modules/auth_radius/authrad_mod.c
Modified: modules/auth_radius/authrad_mod.h
Modified: modules/auth_radius/sterman.c
---
Diff: https://github.com/kamailio/kamailio/commit/e415044acaf6fa15e20d0b90b34227f…
Patch: https://github.com/kamailio/kamailio/commit/e415044acaf6fa15e20d0b90b34227f…
with latest master, i tried to add [group] to mysql db_urls and sqlops
urls, eg.
modparam("mtree", "db_url", "mysql://user:pass@[sip_proxy]127.0.0.1/sip_proxy")
and in my.cfg the group was defined like this:
[sip_proxy]
ssl-ca=/etc/mysql/ca-cert.pem
ssl-cert=/etc/mysql/client-cert.pem
ssl-key=/etc/mysql/client-key.pem
the result was that when i start kamailio, it starts to run out of mysql
connections and dumps core no matter how high i set max_connections in
my.cfg:
Jan 21 00:47:33 siika /usr/bin/sip-proxy[30612]: ERROR: db_mysql [km_my_con.c:114]: db_mysql_new_connection(): driver error: Too many connections
Jan 21 00:47:33 siika /usr/bin/sip-proxy[30612]: ERROR: <core> [db.c:314]: db_do_init2(): could not add connection to the pool
Jan 21 00:47:33 siika /usr/bin/sip-proxy[30612]: ERROR: mtree [mtree_mod.c:346]: mi_child_init(): failed to connect to database
Jan 21 00:47:33 siika /usr/bin/sip-proxy[30612]: ERROR: <core> [sr_module.c:900]: init_mod_child(): Error while initializing module mtree (/usr/lib/sip-proxy/modules/mtree.so)
without the [group] kamailio starts fine and does not complain about too
many connections.
is this a bug in group handling or something else?
-- juha