Re: [OpenSER-Devel] SF.net SVN: openser: [3156 ] trunk/modules/permissions/mi.c

2007-11-21 Thread Henning Westerholt
On Tuesday 20 November 2007, Bogdan-Andrei Iancu wrote: > > this is exactly the type of interface that makes programming and > > debugging in OpenSER for me more hard than necessary. I could tell you a > > story from a recent bug caused of the non-type safty of the str_init > > macro, or explain my

Re: [OpenSER-Devel] SF.net SVN: openser: [ 3156] trunk/modules/permissions/mi.c

2007-11-20 Thread Bogdan-Andrei Iancu
Hi Henning, Henning Westerholt wrote: > On Monday 19 November 2007, Bogdan-Andrei Iancu wrote: > >> To solve this potential problem without any change in the MI interface >> and without no runtime penalties (strlen), I just added a small macro >> MI_SSTR (MI Static String) to compute the len o

Re: [OpenSER-Devel] SF.net SVN: openser: [ 3156] trunk/modules/permissions/mi.c

2007-11-20 Thread Henning Westerholt
On Monday 19 November 2007, Bogdan-Andrei Iancu wrote: > To solve this potential problem without any change in the MI interface > and without no runtime penalties (strlen), I just added a small macro > MI_SSTR (MI Static String) to compute the len of a static string at > compile time. > > With it,

Re: [OpenSER-Devel] SF.net SVN: openser: [3156] trunk/modules/permissions/mi.c

2007-11-19 Thread Bogdan-Andrei Iancu
Dan Pascu wrote: > On Monday 19 November 2007, Bogdan-Andrei Iancu wrote: > >> Hi, >> >> To solve this potential problem without any change in the MI interface >> and without no runtime penalties (strlen), I just added a small macro >> MI_SSTR (MI Static String) to compute the len of a static s

Re: [OpenSER-Devel] SF.net SVN: openser: [3156 ] trunk/modules/permissions/mi.c

2007-11-19 Thread Dan Pascu
On Monday 19 November 2007, Bogdan-Andrei Iancu wrote: > Hi, > > To solve this potential problem without any change in the MI interface > and without no runtime penalties (strlen), I just added a small macro > MI_SSTR (MI Static String) to compute the len of a static string at > compile time. > >

Re: [OpenSER-Devel] SF.net SVN: openser: [3156] trunk/modules/permissions/mi.c

2007-11-19 Thread Bogdan-Andrei Iancu
Hi, To solve this potential problem without any change in the MI interface and without no runtime penalties (strlen), I just added a small macro MI_SSTR (MI Static String) to compute the len of a static string at compile time. With it, instead of having: add_mi_node_child( rpl, 0, "Server

Re: [OpenSER-Devel] SF.net SVN: openser: [3156] trunk/modules/permissions/mi.c

2007-11-16 Thread Dan Pascu
On Friday 16 November 2007, Henning Westerholt wrote: > On Friday 16 November 2007, Dan Pascu wrote: > > Revision: 3156 > > > > http://openser.svn.sourceforge.net/openser/?rev=3156&view=rev Author: > > dan_pascu > > Date: 2007-11-16 04:45:39 -0800 (Fri, 16 Nov 2007) > > > > Log Mess

Re: [OpenSER-Devel] SF.net SVN: openser: [3156] trunk/modules/permissions/mi.c

2007-11-16 Thread Henning Westerholt
On Friday 16 November 2007, Dan Pascu wrote: > Revision: 3156 > http://openser.svn.sourceforge.net/openser/?rev=3156&view=rev > Author: dan_pascu > Date: 2007-11-16 04:45:39 -0800 (Fri, 16 Nov 2007) > > Log Message: > --- > Fixed length of string constants. This should be be

[OpenSER-Devel] SF.net SVN: openser: [3156] trunk/modules/permissions/mi.c

2007-11-16 Thread Dan Pascu
Revision: 3156 http://openser.svn.sourceforge.net/openser/?rev=3156&view=rev Author: dan_pascu Date: 2007-11-16 04:45:39 -0800 (Fri, 16 Nov 2007) Log Message: --- Fixed length of string constants. This should be better done by #define-ing some constants and using sizeof(co