FreeStrBuf(&((*sessions_to_kill)->wc_roomname));
FreeStrBuf(&((*sessions_to_kill)->httpauth_user));
FreeStrBuf(&((*sessions_to_kill)->httpauth_pass));
+ FreeStrBuf(&((*sessions_to_kill)->ImportantMsg));
+ FreeStrBuf(&((*sessions_to_kill)->cs_inet_email));
+ FreeStrBuf(&((*sessions_to_kill)->MigrateReadLineBuf));
free((*sessions_to_kill));
(*sessions_to_kill) = NULL;
}
return ++seq;
}
-/*
- * Collapse multiple cookies on one line
- */
-int ReqGetStrBuf(int *sock, StrBuf *Target, StrBuf *buf)
-{
-
- return ClientGetLine(sock, Target, buf);
-}
-
-
/*
* lingering_close() a`la Apache. see
*/
void context_loop(int *sock)
{
+ const char *Pos = NULL;
const char *buf;
int desired_session = 0;
int got_cookie = 0;
do {
nLine ++;
Line = NewStrBuf();
- if (ReqGetStrBuf(sock, Line, Buf) < 0) return;
+
+
+ if (ClientGetLine(sock, Line, Buf, &Pos) < 0) return;
LineLen = StrLength(Line);
} while (LineLen > 0);
FreeStrBuf(&HeaderName);
-/*/// dbg_PrintHash(HTTPHeaders, nix, NULL); */
+/* dbg_PrintHash(HTTPHeaders, nix, NULL); */
/*
}
else TheSession->httpauth_pass = NewStrBufPlain(httpauth_user, -1);
+ if (TheSession->MigrateReadLineBuf != NULL)
+ FlushStrBuf(TheSession->MigrateReadLineBuf);
+ else TheSession->MigrateReadLineBuf = NewStrBuf();
TheSession->CLineBuf = NewStrBuf();
TheSession->hash_prefs = NewHash(1,NULL); /* Get a hash table for the user preferences */
pthread_mutex_init(&TheSession->SessionMutex, NULL);
pthread_mutex_lock(&TheSession->SessionMutex); /* bind */
pthread_setspecific(MyConKey, (void *)TheSession);
+ if (TheSession->ImportantMsg == NULL)
+ TheSession->ImportantMsg = NewStrBuf();
TheSession->urlstrings = NewHash(1,NULL);
TheSession->vars = NewHash(1,NULL);
TheSession->http_sock = *sock;
}
go_selected_language(); /* set locale */
#endif
- session_loop(HTTPHeaders, ReqLine, ReqType, Buf); /* do transaction */
+ session_loop(HTTPHeaders, ReqLine, ReqType, Buf, &Pos); /* do transaction */
#ifdef ENABLE_NLS
stop_selected_language(); /* unset locale */
#endif