Hello
Distributor ID: Debian
Description: Debian GNU/Linux 7.0 (wheezy)
Release: 7.0
Codename: wheezy
gcc (Debian 4.7.2-5) 4.7.2
CC (gcc) [kamailio] dns_cache.o
dns_cache.c: In function 'dns_srv_get_nxt_rr':
dns_cache.c:2302:5: warning: 'r_sums[1].r_sum' may be used uninitialized in
this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[1].rr' may be used uninitialized in
this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[2].r_sum' may be used uninitialized in
this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[2].rr' may be used uninitialized in
this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[3].r_sum' may be used uninitialized in
this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[3].rr' may be used uninitialized in
this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[4].r_sum' may be used uninitialized in
this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[4].rr' may be used uninitialized in
this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[5].r_sum' may be used uninitialized in
this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[5].rr' may be used uninitialized in
this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[6].r_sum' may be used uninitialized in
this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[6].rr' may be used uninitialized in
this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[7].r_sum' may be used uninitialized in
this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[7].rr' may be used uninitialized in
this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[8].r_sum' may be used uninitialized in
this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[8].rr' may be used uninitialized in
this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[9].r_sum' may be used uninitialized in
this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[9].rr' may be used uninitialized in
this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[10].r_sum' may be used uninitialized
in this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[10].rr' may be used uninitialized in
this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[11].r_sum' may be used uninitialized
in this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[11].rr' may be used uninitialized in
this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[12].r_sum' may be used uninitialized
in this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[12].rr' may be used uninitialized in
this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[13].r_sum' may be used uninitialized
in this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[13].rr' may be used uninitialized in
this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[14].r_sum' may be used uninitialized
in this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[14].rr' may be used uninitialized in
this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[15].r_sum' may be used uninitialized
in this function [-Wuninitialized]
dns_cache.c:2302:5: warning: 'r_sums[15].rr' may be used uninitialized in
this function [-Wuninitialized]
CC (gcc) [kamailio] cfg/cfg_ctx.o
cfg/cfg_ctx.c: In function 'cfg_set_now':
cfg/cfg_ctx.c:490:5: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
cfg/cfg_ctx.c:494:5: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
cfg/cfg_ctx.c:564:4: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
cfg/cfg_ctx.c:564:4: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
cfg/cfg_ctx.c:565:5: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
cfg/cfg_ctx.c:584:5: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
cfg/cfg_ctx.c: In function 'cfg_commit':
cfg/cfg_ctx.c:1125:5: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
cfg/cfg_ctx.c:1133:5: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
cfg/cfg_ctx.c:1185:5: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
cfg/cfg_ctx.c:1185:5: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
cfg/cfg_ctx.c:1190:5: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
cfg/cfg_ctx.c:1225:4: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
cfg/cfg_ctx.c:1226:5: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
cfg/cfg_ctx.c:1226:5: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
cfg/cfg_ctx.c:1228:5: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
cfg/cfg_ctx.c: In function 'cfg_add_group_inst':
cfg/cfg_ctx.c:1582:2: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
cfg/cfg_ctx.c:1583:2: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
cfg/cfg_ctx.c:1585:2: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
cfg/cfg_ctx.c:1594:3: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
cfg/cfg_ctx.c: In function 'cfg_del_group_inst':
cfg/cfg_ctx.c:1678:2: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
cfg/cfg_ctx.c:1679:2: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
cfg/cfg_ctx.c:1681:2: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
cfg/cfg_ctx.c:1692:5: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
cfg/cfg_ctx.c:1710:6: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
cfg/cfg_ctx.c:1712:6: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
cfg/cfg_ctx.c:1718:3: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
CC (gcc) [kamailio] cfg/cfg_struct.o
cfg/cfg_struct.c: In function 'apply_add_var_list':
cfg/cfg_struct.c:1091:2: warning: dereferencing type-punned pointer will
break strict-aliasing rules [-Wstrict-aliasing]
cfg/cfg_struct.c:1092:2: warning: dereferencing type-punned pointer will
break strict-aliasing rules [-Wstrict-aliasing]
Good day!
Now I test new style AVP's for radius response storing. Today
additional radius responses return in special radpair:
SIP-AVP - name, string "email:sr-users@lists.sip-router.org session-timeout#161 nexthopip:h323/0001111@myvoip-gate.kamailio.org" - value.
I don't know why developers chose this way. But it's addition kamailio's feature, so let it be.
But if radius server responded with standard pairs?
Sending Access-Accept of id 60 to 172.16.X.X port 59736
Session-Timeout = 4261674
next-hop-ip = "SIP/00111222333444@cisco-out"
SIP-AVP = "email:sr-users@lists.sip-router.org session-timeout#161 next-hop-ip:h323/0001111@myvoip-gate.kamailio.org"
session-protocol = "SIP"
No chance to get full radius response at this moment. Only parse SIP-AVP pair. This mean that when you wanna integrate K. in existing infrastructure (in my case - billing), u need work with K. and radius. But why, if you already had worked voip devices?
I think more flexible solution ADD in misc_radius function to get radpairs as AVP's.
See that i got:
misc_radius [functions.c:159]: AVP 'Session-Timeout'/0='null'/4261674 has been added
misc_radius [functions.c:143]: AVP 'next-hop-ip'/0='SIP/005555777888@cisco-out'/0 has been added
misc_radius [functions.c:143]: AVP 'session-protocol'/0='SIP'/0 has been added
After radius response i get:
$avp(Session-Timeout)=4261674 (integer)
$avp(next-hop-ip)="SIP/005555777888@cisco-out" (string)
$avp(session-protocol)="SIP" (string)
I think its usable and more flexible.
I see 3 way to integrate it:
1. additionally with existing radius_load_caller_avps/radius_load_callee_avps (i make same for test)
2. new function in same module, like radius_authorize_request (caller,callee).
3. replace existing style. it's bad for backward compability, of cause.
Or it stay my local patch :)
If it really needed and usable i may made any (1..3) way with doc and examples :)
diff --git a/modules/misc_radius/functions.c b/modules/misc_radius/functions.c
index 2a42024..f156939 100644
--- a/modules/misc_radius/functions.c
+++ b/modules/misc_radius/functions.c
@@ -107,6 +107,60 @@ error:
return -1;
}
+static void generate_avps_rad(VALUE_PAIR* received)
+{
+ int_str name, val;
+ unsigned short flags;
+ VALUE_PAIR *vp;
+
+ vp = received;
+
+ for( ; vp ; vp=vp->next) {
+ flags = AVP_NAME_STR;
+ switch(vp->type)
+ {
+ case PW_TYPE_STRING:
+ flags |= AVP_VAL_STR;
+ name.s.len = strlen(vp->name);
+ val.s.len = strlen(vp->strvalue);
+ name.s.s = vp->name;
+ val.s.s = vp->strvalue;
+ if (add_avp( flags, name, val ) < 0) {
+ LM_ERR("unable to create a new AVP\n");
+ } else {
+ LM_DBG("AVP '%.*s'/%d='%.*s'/%d has been added\n",
+ (flags&AVP_NAME_STR)?name.s.len:4,
+ (flags&AVP_NAME_STR)?name.s.s:"null",
+ (flags&AVP_NAME_STR)?0:name.n,
+ (flags&AVP_VAL_STR)?val.s.len:4,
+ (flags&AVP_VAL_STR)?val.s.s:"null",
+ (flags&AVP_VAL_STR)?0:val.n );
+ }
+ continue;
+ case PW_TYPE_INTEGER:
+ name.s.len = strlen(vp->name);
+ name.s.s = vp->name;
+ val.n = vp->lvalue;
+ if (add_avp( flags, name, val ) < 0) {
+ LM_ERR("unable to create a new AVP\n");
+ } else {
+ LM_DBG("AVP '%.*s'/%d='%.*s'/%d has been added\n",
+ (flags&AVP_NAME_STR)?name.s.len:4,
+ (flags&AVP_NAME_STR)?name.s.s:"null",
+ (flags&AVP_NAME_STR)?0:name.n,
+ (flags&AVP_VAL_STR)?val.s.len:4,
+ (flags&AVP_VAL_STR)?val.s.s:"null",
+ (flags&AVP_VAL_STR)?0:val.n );
+ }
+ continue;
+ default:
+ LM_ERR("skip attribute type %d (non-string)", vp->type);
+ continue;
+ }
+ return;
+ }
+}
+
/* Generate AVPs from Radius reply items */
static void generate_avps(struct attr *attrs, VALUE_PAIR* received)
@@ -212,6 +266,7 @@ int radius_load_caller_avps(struct sip_msg* _m, char* _caller, char* _s2)
LM_DBG("success\n");
rc_avpair_free(send);
generate_avps(caller_attrs, received);
+ generate_avps_rad(received);
rc_avpair_free(received);
return 1;
} else {
--
WBR, Victor
JID: coyote(a)bks.tv
JID: coyote(a)bryansktel.ru
I use FREE operation system: 3.8.4-calculate GNU/Linux
Hello,
among the topics discussed just before the last major release series
(4.0.x) was one about restructuring the source code tree. It started
mainly as a proposal to move source code belonging to core in a
dedicated folder, but there could be more variants. It's time start
discussing if we do it, and if yes, how.
Here is what I could collect so far.
a) no change, keep like it is
b) move source code of core in a dedicated folder named 'core'
c) move all source code in a folder named src, with following sub-structure
src/core - for core
src/lib - for internal libraries
src/modules - for module
Feel free to propose other variants or express your opinion regarding
the proposed options.
Cheers,
Daniel
--
Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, San Francisco, USA - June 24-27, 2013
* http://asipto.com/u/katu *
if presence module gets subscribe for event is does not support, it
prints error message:
May 4 08:49:03 sars /usr/sbin/pres-serv[3826]: ERROR: presence [subscribe.c:1030]: Unsupported event header field value xcap-diff
in my opinion, it is not really an error. does anyone object if i
downgrade the message to NOTICE or INFO?
-- juha