]> code.citadel.org Git - citadel.git/blobdiff - citadel/citserver.c
Citadel API clean up.
[citadel.git] / citadel / citserver.c
index b6970bf0a1b5239cdfcd518c02615225ccb37110..94132babc1c2f85abb322641a384df3364ef94e6 100644 (file)
@@ -144,6 +144,7 @@ void master_startup(void) {
        unsigned int seed;
        FILE *urandom;
        struct ctdlroom qrbuf;
+       int rv;
        
        CtdlLogPrintf(CTDL_DEBUG, "master_startup() started\n");
        time(&server_startup_time);
@@ -158,27 +159,27 @@ void master_startup(void) {
        check_ref_counts();
 
        CtdlLogPrintf(CTDL_INFO, "Creating base rooms (if necessary)\n");
-       create_room(config.c_baseroom,  0, "", 0, 1, 0, VIEW_BBS);
-       create_room(AIDEROOM,           3, "", 0, 1, 0, VIEW_BBS);
-       create_room(SYSCONFIGROOM,      3, "", 0, 1, 0, VIEW_BBS);
-       create_room(config.c_twitroom,  0, "", 0, 1, 0, VIEW_BBS);
+       CtdlCreateRoom(config.c_baseroom,       0, "", 0, 1, 0, VIEW_BBS);
+       CtdlCreateRoom(AIDEROOM,                3, "", 0, 1, 0, VIEW_BBS);
+       CtdlCreateRoom(SYSCONFIGROOM,   3, "", 0, 1, 0, VIEW_BBS);
+       CtdlCreateRoom(config.c_twitroom,       0, "", 0, 1, 0, VIEW_BBS);
 
        /* The "Local System Configuration" room doesn't need to be visible */
-        if (lgetroom(&qrbuf, SYSCONFIGROOM) == 0) {
+        if (CtdlGetRoomLock(&qrbuf, SYSCONFIGROOM) == 0) {
                 qrbuf.QRflags2 |= QR2_SYSTEM;
-                lputroom(&qrbuf);
+                CtdlPutRoomLock(&qrbuf);
         }
 
        /* Aide needs to be public postable, else we're not RFC conformant. */
-        if (lgetroom(&qrbuf, AIDEROOM) == 0) {
+        if (CtdlGetRoomLock(&qrbuf, AIDEROOM) == 0) {
                 qrbuf.QRflags2 |= QR2_SMTP_PUBLIC;
-                lputroom(&qrbuf);
+                CtdlPutRoomLock(&qrbuf);
         }
 
        CtdlLogPrintf(CTDL_INFO, "Seeding the pseudo-random number generator...\n");
        urandom = fopen("/dev/urandom", "r");
        if (urandom != NULL) {
-               fread(&seed, sizeof seed, 1, urandom);
+               rv = fread(&seed, sizeof seed, 1, urandom);
                fclose(urandom);
        }
        else {