-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
avpops doc say that avp spec for integer values is $avp(i[script_flags]:<ID>)
Is it possible to set avp aliases to that values, e.g. avp_aliases="x=i1:10" avp_aliases="y=i2:10"
?
When I do that, I got this error message in openser 1.3:
Nov 14 16:00:42 [28355] ERROR:core:add_avp_galias: duplicate alias/avp entry Nov 14 16:00:42 [28355] ERROR:core:add_avp_galias_str: add global alias failed Nov 14 16:00:42 [28355] CRITICAL:core:yyerror: parse error (54,3-4): invalid AVP aliases
regards helmut
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello again,
isn't there anyone who can answere this ? It's not really critical for me, but an avp alias is much better to understand than $avp(i1:10) ...
regards Helmut
Helmut Kuper schrieb:
Hi,
avpops doc say that avp spec for integer values is $avp(i[script_flags]:<ID>)
Is it possible to set avp aliases to that values, e.g. avp_aliases="x=i1:10" avp_aliases="y=i2:10"
?
When I do that, I got this error message in openser 1.3:
Nov 14 16:00:42 [28355] ERROR:core:add_avp_galias: duplicate alias/avp entry Nov 14 16:00:42 [28355] ERROR:core:add_avp_galias_str: add global alias failed Nov 14 16:00:42 [28355] CRITICAL:core:yyerror: parse error (54,3-4): invalid AVP aliases
regards helmut
_______________________________________________ Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users
Hello,
On 11/16/07 11:34, Helmut Kuper wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello again,
isn't there anyone who can answere this ? It's not really critical for me, but an avp alias is much better to understand than $avp(i1:10) ...
do you have multiple aliases to same avp ID but with different flags?
If so and does not work, please add a feature request for 1.4, the aliases were designed for names, didn't take in consideration at that time the flags, but makes sense to some extent now, so should be kept in a list, not to be forgotten:
http://sourceforge.net/tracker/?atid=743023&group_id=139143&func=bro...
Cheers, Daniel
regards Helmut
Helmut Kuper schrieb:
Hi,
avpops doc say that avp spec for integer values is $avp(i[script_flags]:<ID>)
Is it possible to set avp aliases to that values, e.g. avp_aliases="x=i1:10" avp_aliases="y=i2:10"
?
When I do that, I got this error message in openser 1.3:
Nov 14 16:00:42 [28355] ERROR:core:add_avp_galias: duplicate alias/avp entry Nov 14 16:00:42 [28355] ERROR:core:add_avp_galias_str: add global alias failed Nov 14 16:00:42 [28355] CRITICAL:core:yyerror: parse error (54,3-4): invalid AVP aliases
regards helmut
Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHPWQa4tZeNddg3dwRArm5AJ47pYj09WJxe+7rU24GLUWuDdou1QCgtDBi tSxsJw6Z8Z1bm74o1c5w4Co= =nxga -----END PGP SIGNATURE-----
Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
has anyone an answere to this ?
regards helmut
Helmut Kuper schrieb:
Hello again,
isn't there anyone who can answere this ? It's not really critical for me, but an avp alias is much better to understand than $avp(i1:10) ...
regards Helmut
Helmut Kuper schrieb:
Hi,
avpops doc say that avp spec for integer values is $avp(i[script_flags]:<ID>)
Is it possible to set avp aliases to that values, e.g. avp_aliases="x=i1:10" avp_aliases="y=i2:10"
?
When I do that, I got this error message in openser 1.3:
Nov 14 16:00:42 [28355] ERROR:core:add_avp_galias: duplicate alias/avp entry Nov 14 16:00:42 [28355] ERROR:core:add_avp_galias_str: add global alias failed Nov 14 16:00:42 [28355] CRITICAL:core:yyerror: parse error (54,3-4): invalid AVP aliases
regards helmut
Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users
_______________________________________________ Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello,
I spent some time to help myself out with this problem. I found that function "dbrow2avp()" in file "modules/avpops/avpops_impl.c" around line 219 has maybe a bug.
It set script flags for loaded AVPs only for type AVPOPS_VAL_PVAR (this means only for avp(name) spec e.g. $avp(i1:10))
For the other types (AVPOPS_VAL_NONE, AVPOPS_VAL_INT, AVPOPS_VAL_STR) (means "i/I", "s/S", "a/A") the scriptflags are never set after loading AVPs from DB.
So just comment out or delete line 219 -> "if(dbp->a.type==AVPOPS_VAL_PVAR)"
so that "db_flags |= dbp->a.u.sval.pvp.pvn.u.isname.type&0xff00;" is always executed.
Dunno if this is the right place or hack to solve my problem cleanly, but currently it works for me to do something like avp_db_load("$fu", "i1") to load all integer AVPs with scriptflags=1 for party A and avp_db_load("$ru", "i2") to load same avp ids für party B with scriptflags=2.
regards Helmut
Hello,
thanks for reporting. I will check and fix if any issue.
Cheers, Daniel
On 12/10/07 12:57, Helmut Kuper wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello,
I spent some time to help myself out with this problem. I found that function "dbrow2avp()" in file "modules/avpops/avpops_impl.c" around line 219 has maybe a bug.
It set script flags for loaded AVPs only for type AVPOPS_VAL_PVAR (this means only for avp(name) spec e.g. $avp(i1:10))
For the other types (AVPOPS_VAL_NONE, AVPOPS_VAL_INT, AVPOPS_VAL_STR) (means "i/I", "s/S", "a/A") the scriptflags are never set after loading AVPs from DB.
So just comment out or delete line 219 -> "if(dbp->a.type==AVPOPS_VAL_PVAR)"
so that "db_flags |= dbp->a.u.sval.pvp.pvn.u.isname.type&0xff00;" is always executed.
Dunno if this is the right place or hack to solve my problem cleanly, but currently it works for me to do something like avp_db_load("$fu", "i1") to load all integer AVPs with scriptflags=1 for party A and avp_db_load("$ru", "i2") to load same avp ids für party B with scriptflags=2.
regards Helmut -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHXRuT4tZeNddg3dwRAgFRAJ9FcKcZjKj/w8LnUO9/0r+j2x5Y7ACdEOTO YyUd2gpGe4RVhNcJdXXbX4A= =25sA -----END PGP SIGNATURE-----
Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users
Hello,
indeed, there was a bug. It is fixed now on SVN, the solution you proposed is right.
Cheers, Daniel
On 12/10/07 13:08, Daniel-Constantin Mierla wrote:
Hello,
thanks for reporting. I will check and fix if any issue.
Cheers, Daniel
On 12/10/07 12:57, Helmut Kuper wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello,
I spent some time to help myself out with this problem. I found that function "dbrow2avp()" in file "modules/avpops/avpops_impl.c" around line 219 has maybe a bug.
It set script flags for loaded AVPs only for type AVPOPS_VAL_PVAR (this means only for avp(name) spec e.g. $avp(i1:10))
For the other types (AVPOPS_VAL_NONE, AVPOPS_VAL_INT, AVPOPS_VAL_STR) (means "i/I", "s/S", "a/A") the scriptflags are never set after loading AVPs from DB.
So just comment out or delete line 219 -> "if(dbp->a.type==AVPOPS_VAL_PVAR)"
so that "db_flags |= dbp->a.u.sval.pvp.pvn.u.isname.type&0xff00;" is always executed.
Dunno if this is the right place or hack to solve my problem cleanly, but currently it works for me to do something like avp_db_load("$fu", "i1") to load all integer AVPs with scriptflags=1 for party A and avp_db_load("$ru", "i2") to load same avp ids für party B with scriptflags=2.
regards Helmut -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHXRuT4tZeNddg3dwRAgFRAJ9FcKcZjKj/w8LnUO9/0r+j2x5Y7ACdEOTO YyUd2gpGe4RVhNcJdXXbX4A= =25sA -----END PGP SIGNATURE-----
Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi again,
further tests with avp and script_flags raised new problems. When I write resp. set an AVP like "$avp(i1:10)=10; $avp(i2:10)=20;" and checking them with "xlog('L_INFO', 'avp(i1:10) avp(i1:20)\n');" it leads to "20 20" as output.
In file pvar.c in function pv_get_avp_name() I had to replace
*name_type = 0;
with
*name_type = ip->pvn.u.isname.type;
Then that worked.
- -.-
Additionally I fixed the Alias-Duplicate Problem when you do something like avp_aliases("A=i1:10; B=i2:20");
In file usr_avp.c I had to change line 427 in function check_avp_galias() from
type &= AVP_NAME_STR;
to
type &= (AVP_NAME_STR|AVP_SCRIPT_MASK);
- -.-
Then at last, if u want assign a value to an AVP-Alias which uses script flags replace in file usr_avp.c in function add_avp_galias() around line 482 the line
ga->avp.type = type&AVP_NAME_STR;
with
ga->avp.type = type&(AVP_NAME_STR|AVP_SCRIPT_MASK);
Maybe there are more lines of code to change to get openser handling script flags correctly... we will c.
regards helmut
Hello,
thanks for reporting and hints. It is fixed now on SVN.
Cheers, Daniel
PS. All mails sent to you are returning "Mail delivery failed: returning message to sender". Is this your good email address?
On 12/10/07 19:00, Helmut Kuper wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi again,
further tests with avp and script_flags raised new problems. When I write resp. set an AVP like "$avp(i1:10)=10; $avp(i2:10)=20;" and checking them with "xlog('L_INFO', 'avp(i1:10) avp(i1:20)\n');" it leads to "20 20" as output.
In file pvar.c in function pv_get_avp_name() I had to replace
*name_type = 0;
with
*name_type = ip->pvn.u.isname.type;
Then that worked.
- -.-
Additionally I fixed the Alias-Duplicate Problem when you do something like avp_aliases("A=i1:10; B=i2:20");
In file usr_avp.c I had to change line 427 in function check_avp_galias() from
type &= AVP_NAME_STR;
to
type &= (AVP_NAME_STR|AVP_SCRIPT_MASK);
- -.-
Then at last, if u want assign a value to an AVP-Alias which uses script flags replace in file usr_avp.c in function add_avp_galias() around line 482 the line
ga->avp.type = type&AVP_NAME_STR;
with
ga->avp.type = type&(AVP_NAME_STR|AVP_SCRIPT_MASK);
Maybe there are more lines of code to change to get openser handling script flags correctly... we will c.
regards helmut
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHXXCx4tZeNddg3dwRAgt/AJ9KP7gzx4qm4or/oTrm4gaVC+ZfzACeIphq /uDeDC9PplCsLnP9eRWS7KE= =sGfe -----END PGP SIGNATURE-----
Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users
Hello,
On 12/07/07 15:42, Helmut Kuper wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
has anyone an answere to this ?
there was an answer: http://lists.openser.org/pipermail/users/2007-November/014472.html
Cheers, Daniel
regards helmut
Helmut Kuper schrieb:
Hello again,
isn't there anyone who can answere this ? It's not really critical for me, but an avp alias is much better to understand than $avp(i1:10) ...
regards Helmut
Helmut Kuper schrieb:
Hi,
avpops doc say that avp spec for integer values is $avp(i[script_flags]:<ID>)
Is it possible to set avp aliases to that values, e.g. avp_aliases="x=i1:10" avp_aliases="y=i2:10"
?
When I do that, I got this error message in openser 1.3:
Nov 14 16:00:42 [28355] ERROR:core:add_avp_galias: duplicate alias/avp entry Nov 14 16:00:42 [28355] ERROR:core:add_avp_galias_str: add global alias failed Nov 14 16:00:42 [28355] CRITICAL:core:yyerror: parse error (54,3-4): invalid AVP aliases
regards helmut
Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHWU2s4tZeNddg3dwRAlrfAJ0RL6+wYuCXR2EDkt+SFd6aAwNTXgCffvoa HdtCxhcrSpe6mHbhOYxj0qE= =LC0p -----END PGP SIGNATURE-----
Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users