Re: wapbox restart (Kannel wapbox version cvs-20030917) SOLVED

Aarno Syvänen <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Less dirtier way IMHO is define semantics:
either NULL is equal to NULL
or NULL is unequal to everything, including NULL
or NULL is equal to everything

Problem is that if you compare something to NULL,
you have one (or two) unhandled NULL pointers
earlier. NULL is Kannel means quite often "no
configuration variable supplied"

Aarno

On 10.3.2004, at 14:06, Yury Mikhienko wrote:

> On Wed, 10 Mar 2004 13:34:32 +0300
> Paul P Komkoff Jr <[email protected]> wrote:
>
>> Replying to Yury Mikhienko:
>>> Hi again!
>>>
>>> What about my question?
>>> Any suggestions?
>>>
>>> I need help :(((
>>
>>
>> can you instead of yelling and screaming provide us backtrace of yours
>> situation?
>>
>> if it dumps core when crashes load it into gdb and do a bt full
>> ?
>>
>
> I solve the problem by add the following lines into octstr_compare 
> function (add NULL check):
>
>     seems_valid(ostr1);
>     seems_valid(ostr2);
>
> +    if ((ostr1 == NULL) && (ostr2 == NULL))
> +            return 0;
> +
> +    if ((ostr1 != NULL) && (ostr2 == NULL))
> +            return 1;
> +
> +    if ((ostr1 == NULL) && (ostr2 != NULL))
> +            return -1;
>
> It very dirty way, but fast and effective in my case.
>
> -- 
>
> Best regards,
> Yury Mikhienko.
> IT ERP group head, ZAO "Mobikom-Kavkaz"
> tel: (8632) 704188
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.