Re: [naviserver-devel] Config error

2009-02-05 Thread Vasiljevic Zoran
On 05.02.2009, at 20:51, Stephen Deasey wrote: > If we limit ourselves to gcc: > > > Ns_Log(Dev, "config: %s:%s value=\"%s\" default=\"%s\" (string)", >section ?: "", key, value ?: "", def ?: ""); > > > (Our Windows build works with gcc only now, I think). Please don't! We use VCC+ t

Re: [naviserver-devel] Config error

2009-02-05 Thread Stephen Deasey
On Thu, Feb 5, 2009 at 7:28 PM, Vasiljevic Zoran wrote: > > On 05.02.2009, at 20:30, Vlad Seryakov wrote: > >> simple macro like #define NS_STR(s) (s != NULL ? s : "") >> can be used instead of using ?: every time > > I buy that. I dunno, seems a bit gratuitous. You can't tell what the code doe

Re: [naviserver-devel] Config error

2009-02-05 Thread Vasiljevic Zoran
On 05.02.2009, at 20:30, Vlad Seryakov wrote: > simple macro like #define NS_STR(s) (s != NULL ? s : "") > can be used instead of using ?: every time I buy that. -- Create and Deploy Rich Internet Apps outside the bro

Re: [naviserver-devel] Config error

2009-02-05 Thread Vlad Seryakov
simple macro like #define NS_STR(s) (s != NULL ? s : "") can be used instead of using ?: every time Stephen Deasey wrote: > On Thu, Feb 5, 2009 at 5:21 PM, Vasiljevic Zoran wrote: >> On 05.02.2009, at 18:14, Vlad Seryakov wrote: >> >>> The reason i think because Ns_DStringPrintf now uses OS's sn

Re: [naviserver-devel] Config error

2009-02-05 Thread Stephen Deasey
On Thu, Feb 5, 2009 at 5:21 PM, Vasiljevic Zoran wrote: > > On 05.02.2009, at 18:14, Vlad Seryakov wrote: > >> The reason i think because Ns_DStringPrintf now uses OS's snprintf, >> before that it uses home-grown sprintf-like engine. Yeah, all uses of printf-like functions throughout the code ba

Re: [naviserver-devel] Config error

2009-02-05 Thread Vasiljevic Zoran
On 05.02.2009, at 18:14, Vlad Seryakov wrote: > The reason i think because Ns_DStringPrintf now uses OS's snprintf, > before that it uses home-grown sprintf-like engine. > Most probably. But that will not help us of course. I will need to learn this brave new code repository thing... Cheers Z

Re: [naviserver-devel] Config error

2009-02-05 Thread Vlad Seryakov
The reason i think because Ns_DStringPrintf now uses OS's snprintf, before that it uses home-grown sprintf-like engine. Vasiljevic Zoran wrote: > On 05.02.2009, at 17:47, Vlad Seryakov wrote: > >> On Linux it just should show null because underlying snprintf >> handles NULLs pretty well > >

Re: [naviserver-devel] Config error

2009-02-05 Thread Vasiljevic Zoran
On 05.02.2009, at 17:47, Vlad Seryakov wrote: > On Linux it just should show null because underlying snprintf > handles NULLs pretty well On Solaris, it cores all arround. -- Create and Deploy Rich Internet Apps out

Re: [naviserver-devel] Config error

2009-02-05 Thread Vlad Seryakov
On Linux it just should show null because underlying snprintf handles NULLs pretty well Vasiljevic Zoran wrote: > Hi! > > It seems that we have problems if Dev logging is enabled. > By definition the ConfigGet may return NULL. Also the value > of the section param passed to this (below) and othe

Re: [naviserver-devel] Config error

2009-02-05 Thread Vasiljevic Zoran
Even worse, the "def" argument may also be NULL. Throughout in this file the: > Ns_Log(Dev, "config: %s:%s value=\"%s\" default=\"%s\" (string)", >section, key, value, def); should be changed to something like > Ns_Log(Dev, "config: %s:%s value=\"%s\" default=\"%s\" (string)", >

[naviserver-devel] Config error

2009-02-05 Thread Vasiljevic Zoran
Hi! It seems that we have problems if Dev logging is enabled. By definition the ConfigGet may return NULL. Also the value of the section param passed to this (below) and other similar functions may also be NULL. In such cases the Ns_Log below crashes at dereferencing section and/or value ptrs. C