when one is explicitly created. Some stuff is missing otherwise.
$Log$
+Revision 400.71 2002/12/26 04:04:48 ajc
+* Perform CHEK command when automatically establishing sessions, not just
+ when one is explicitly created. Some stuff is missing otherwise.
+
Revision 400.70 2002/12/25 23:18:06 ajc
* Be more strategic about when to call ical_dezonify()
(This may be the last set of fixes. I hope so.)
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
+
*/
void become_logged_in(char *user, char *pass, char *serv_response)
{
+ char buf[SIZ];
+
WC->logged_in = 1;
extract(WC->wc_username, &serv_response[4], 0);
strcpy(WC->wc_password, pass);
if (WC->axlevel >= 6) {
WC->is_aide = 1;
}
+
load_preferences();
+
+ serv_puts("CHEK");
+ serv_gets(buf);
+ if (buf[0] == '2') {
+ WC->new_mail = extract_int(&buf[4], 0);
+ WC->need_regi = extract_int(&buf[4], 1);
+ WC->need_vali = extract_int(&buf[4], 2);
+ extract(WC->cs_inet_email, &buf[4], 3);
+ }
}
void do_login(void)
{
char buf[SIZ];
- int need_regi = 0;
-
if (!strcasecmp(bstr("action"), "Exit")) {
do_logout();
}
}
if (WC->logged_in) {
- serv_puts("CHEK");
- serv_gets(buf);
- if (buf[0] == '2') {
- WC->new_mail = extract_int(&buf[4], 0);
- need_regi = extract_int(&buf[4], 1);
- WC->need_vali = extract_int(&buf[4], 2);
- extract(WC->cs_inet_email, &buf[4], 3);
- }
- if (need_regi) {
+ if (WC->need_regi) {
display_reg(1);
} else {
do_welcome();
if (!strncasecmp(organizer_string, "MAILTO:", 7)) {
strcpy(organizer_string, &organizer_string[7]);
striplt(organizer_string);
+ lprintf(9, "ISME %s\n", organizer_string);
serv_printf("ISME %s", organizer_string);
serv_gets(buf);
+ lprintf(9, "%s\n", buf);
if (buf[0] == '2') {
organizer_is_me = 1;
}
char *upload;
int new_mail;
int remember_new_mail;
- int need_vali;
+ int need_regi; /* This user needs to register. */
+ int need_vali; /* New users require validation. */
char cs_inet_email[SIZ]; /* User's preferred Internet addr. */
pthread_mutex_t SessionMutex; /* mutex for exclusive access */
time_t lastreq; /* Timestamp of most recent HTTP */