Ensure client.database (session_database) is set to NULL when it
is no longer associated with a session. If it is NULL, then function
client_get_URL will return "NOURL".
assert(*ccp == c);
*ccp = c->next;
+ c->database = 0;
c->session = 0;
c->next = 0;
}
const char *client_get_url(struct client *cl)
{
- return client_get_database(cl)->database->url;
+ if (cl->database)
+ return client_get_database(cl)->database->url;
+ else
+ return "NOURL";
}
void client_set_maxrecs(struct client *cl, int v)