lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev persistent cookies - a correction


From: Klaus Weide
Subject: Re: lynx-dev persistent cookies - a correction
Date: Wed, 9 Dec 1998 15:07:47 -0600 (CST)

On Wed, 9 Dec 1998, I wrote:

> There seems to be another omission in this section:
> 
> #ifdef EXP_PERSISTENT_COOKIES
>         /* ... */
>         if (persistent_cookies) {
>             if ((de->bv = FROM_FILE) != 0) {
>                 HTList_appendObject(cookie_list, co);
>             } else {
>                 HTList_insertObjectAt(cookie_list, co, pos);
>             }
>         } else        <<<<<
> #else
>         HTList_insertObjectAt(cookie_list, co, pos);
> #endif /* EXP_PERSISTENT_COOKIES */
> 
> The `else' should be added (or the whole thing be rewritten some other way).
> Otherwise cookies are silently dropped if defined(EXP_PERSISTENT_COOKIES)
> but !persistent_cookies.

That doesn't make sense of course...
What I rather meant was:

#ifdef EXP_PERSISTENT_COOKIES
        /* ... */
        if (persistent_cookies) {
            if (de->bv == FROM_FILE) {
                HTList_appendObject(cookie_list, co);
            } else {
                HTList_insertObjectAt(cookie_list, co, pos);
            }
        } else        <<<<<
#endif /* EXP_PERSISTENT_COOKIES */
        HTList_insertObjectAt(cookie_list, co, pos);


which could also be rewritten as


#ifdef EXP_PERSISTENT_COOKIES
        /* ... */
        if (persistent_cookies && de->bv == FROM_FILE) {
                HTList_appendObject(cookie_list, co);
        } else
#endif /* EXP_PERSISTENT_COOKIES */
        HTList_insertObjectAt(cookie_list, co, pos);


     Klaus

reply via email to

[Prev in Thread] Current Thread [Next in Thread]