Skip to content

sess_initialized is never reset #33

Closed
@LeSpocky

Description

@LeSpocky

While testing a fix for #25 I saw it does not solve the problem I actually try to solve. 😥

In a classic CGI the process is started, some things are done, the process ends, everything not released by yourself is cleaned up by the operating system. Now if you want to use libcgi together with FastCGI (this requires patches not in mainline yet) the process never ends, but the whole thing is enclosed by an endless loop. In this case the library MUST do proper bookkeeping and cleanup.

So when using libcgi in such a loop the first call to cgi_session_start() sets sess_initialized to true, every following call fails, because sess_initialized is never reset to false, which makes the whole session thing unusable.

There is a second variable sess_finitialized which is never tested and only set to false in cgi_session_destroy(). So even if this is meant to be the same as sess_initialized it would not work, because cgi_session_destroy() is not called every time. Actually most of the time you don't want to destroy your session, but keep it.

So there needs to be a way for resetting those flags and find a proper name for this function.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions