]> code.citadel.org Git - citadel.git/blobdiff - webcit/auth.c
* grr ... I did this wrong ... more fixes to come
[citadel.git] / webcit / auth.c
index a4837d9311bc00777a55548d97e65524b968dcda..5ef52a6de6b4c97706d3cfa8a82fc8656f1f2bf7 100644 (file)
@@ -741,8 +741,8 @@ 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();
@@ -775,8 +775,22 @@ void display_reg(int during_login)
                do_edit_vcard(vcard_msgnum, "1", VCMsg, VCAtt, "do_welcome", USERCONFIGROOM);
        }
        else {
-               do_edit_vcard(vcard_msgnum, "1", VCMsg, VCAtt, "display_main_menu", USERCONFIGROOM);
+               StrBuf *ReturnTo;
+               ReturnTo = NewStrBufPlain(NULL, 256);
+               StrBufUrlescAppend(ReturnTo, NULL, "display_main_menu?gotofirst=");
+               StrBufUrlescAppend(ReturnTo, WC->wc_roomname, NULL);
+               lprintf(9, "\e[32mwc_roomname: %s\e[0m\n", ChrPtr(WC->wc_roomname));
+               lprintf(9, "\e[31m   ReturnTo: %s\e[0m\n", ChrPtr(ReturnTo));
+               do_edit_vcard(vcard_msgnum, "1", VCMsg, VCAtt, ChrPtr(ReturnTo), USERCONFIGROOM);
+               FreeStrBuf(&ReturnTo);
        }
+
+       /*
+               FIXME
+               1. don't we have to free VCMsg and VCAtt ??
+               2. Fix bug 268
+       */
+
 }