]> code.citadel.org Git - citadel.git/blobdiff - webcit/auth.c
* locate_user_vcard_in_this_room() lost the ability to return the msgnum of the vcard...
[citadel.git] / webcit / auth.c
index 2f023a5ecb31a7464b25d60bd29e21139d178fab..663f3d246af1e75134cdea0933a5b3514ac1be67 100644 (file)
@@ -741,14 +741,19 @@ void validate(void)
 void display_reg(int during_login)
 {
        StrBuf *Buf;
-       message_summary *VCMsg;
-       wc_mime_attachment *VCAtt;
+       message_summary *VCMsg = NULL;
+       wc_mime_attachment *VCAtt = NULL;
        long vcard_msgnum;
 
        Buf = NewStrBuf();
        if (goto_config_room(Buf) != 0) {
-               if (during_login) do_welcome();
-               else display_main_menu();
+               lprintf(9, "display_reg() exiting because goto_config_room() failed\n");
+               if (during_login) {
+                       do_welcome();
+               }
+               else {
+                       display_main_menu();
+               }
                FreeStrBuf(&Buf);
                return;
        }
@@ -756,8 +761,13 @@ void display_reg(int during_login)
        FreeStrBuf(&Buf);
        vcard_msgnum = locate_user_vcard_in_this_room(&VCMsg, &VCAtt);
        if (vcard_msgnum < 0L) {
-               if (during_login) do_welcome();
-               else display_main_menu();
+               lprintf(9, "display_reg() exiting because locate_user_vcard_in_this_room() failed\n");
+               if (during_login) {
+                       do_welcome();
+               }
+               else {
+                       display_main_menu();
+               }
                return;
        }
 
@@ -768,6 +778,7 @@ void display_reg(int during_login)
                do_edit_vcard(vcard_msgnum, "1", VCMsg, VCAtt, "display_main_menu", USERCONFIGROOM);
        }
 
+       /* FIXME don't we have to free VCMsg and VCAtt ?? */
 }
 
 
@@ -892,11 +903,14 @@ int ConditionalRoomAide(StrBuf *Target, WCTemplputParams *TP)
        return (WCC != NULL)? (WCC->is_room_aide == 0) : 0;
 }
 
+
 int ConditionalIsLoggedIn(StrBuf *Target, WCTemplputParams *TP) 
 {
        wcsession *WCC = WC;
        return (WCC != NULL)? (WCC->logged_in == 0) : 0;
 }
+
+
 int ConditionalRoomAcessDelete(StrBuf *Target, WCTemplputParams *TP)
 {
        wcsession *WCC = WC;
@@ -904,9 +918,15 @@ int ConditionalRoomAcessDelete(StrBuf *Target, WCTemplputParams *TP)
 }
 
 
+void _display_openid_login(void) {
+       display_openid_login(NULL);
+}
+
+
+void _display_reg(void) {
+       display_reg(0);
+}
 
-void _display_openid_login(void) {display_openid_login(NULL);}
-void _display_reg(void) {display_reg(0);}
 
 void Header_HandleAuth(StrBuf *Line, ParsedHttpHdrs *hdr)
 {