]> code.citadel.org Git - citadel.git/blobdiff - citadel/citserver.c
* Removed some cruft from the login code. Combined the
[citadel.git] / citadel / citserver.c
index f334f5cfd8d94f26426431794251aa848bf2a34a..ca612b0b0ed9b93261a789a8fa29b5de1d82e474 100644 (file)
@@ -170,6 +170,7 @@ void master_startup(void) {
                gettimeofday(&tv, NULL);
                seed = tv.tv_usec;
        }
+       srand(seed);
        srandom(seed);
 
        CtdlLogPrintf(CTDL_INFO, "Initializing ipgm secret\n");
@@ -309,6 +310,13 @@ void cmd_info(void) {
        cprintf("1\n");         /* yes, Sieve mail filtering is supported */
        cprintf("%d\n", config.c_enable_fulltext);
        cprintf("%s\n", svn_revision());
+
+       if (config.c_auth_mode == AUTHMODE_NATIVE) {
+               cprintf("1\n"); /* OpenID is enabled when using native auth */
+       }
+       else {
+               cprintf("0\n"); /* OpenID is disabled when using non-native auth */
+       }
        
        cprintf("000\n");
 }
@@ -637,7 +645,7 @@ void cmd_emsg(char *mname)
        }
        cprintf("%d %s\n", SEND_LISTING, targ);
 
-       while (client_getln(buf, sizeof buf), strcmp(buf, "000")) {
+       while (client_getln(buf, sizeof buf) >=0 && strcmp(buf, "000")) {
                fprintf(mfp, "%s\n", buf);
        }