]> code.citadel.org Git - citadel.git/blobdiff - webcit/webcit.c
For closed systems, still handle login through the modal
[citadel.git] / webcit / webcit.c
index 11b3c53869f7ade2c320a930ef1259ee0b220a7b..5d213a5f0389bd036b7ebc3e92d175a240a10110 100644 (file)
@@ -2,7 +2,24 @@
  * This is the main transaction loop of the web service.  It maintains a
  * persistent session to the Citadel server, handling HTTP WebCit requests as
  * they arrive and presenting a user interface.
+ *
+ * Copyright (c) 1996-2011 by the citadel.org team
+ *
+ * This program is open source software.  You can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  */
+
 #define SHOW_ME_VAPPEND_PRINTF
 #include <stdio.h>
 #include <stdarg.h>
@@ -10,7 +27,6 @@
 #include "groupdav.h"
 #include "webserver.h"
 
-
 StrBuf *csslocal = NULL;
 HashList *HandlerHash = NULL;
 
@@ -495,7 +511,7 @@ void push_destination(void) {
 void pop_destination(void) {
        wcsession *WCC = WC;
 
-       if (!WCC) {
+       if ( (!WCC) || (WCC->PushedDestination == NULL) || (StrLength(WCC->PushedDestination) == 0) ) {
                do_welcome();
                return;
        }