Changed session logging in order to determine why some sessions are not timing out.
[citadel.git] / webcit / webcit.h
index 9a30bede6ceced9bbe1624ecf7bd77922b23b03a..c67111119f38133fd8aafe9a207fb80b3b07ed6c 100644 (file)
@@ -50,6 +50,7 @@
 #include <stdarg.h>
 #include <pthread.h>
 #include <signal.h>
+#include <syslog.h>
 #include <sys/utsname.h>
 #include <libcitadel.h>
 
@@ -131,7 +132,7 @@ extern char *ssl_cipher_list;
 
 #define SIZ                    4096            /* generic buffer size */
 
-#define TRACE fprintf(stderr, "\033[7mCheckpoint: %s, %d\033[0m\n", __FILE__, __LINE__)
+#define TRACE syslog(LOG_DEBUG, "CHECKPOINT: %s, %d", __FILE__, __LINE__)
 
 #define SLEEPING               180             /* TCP connection timeout */
 #define WEBCIT_TIMEOUT         900             /* WebCit session timeout */
@@ -454,6 +455,7 @@ typedef struct _ParsedHttpHdrs {
        StrBuf *c_language;
        StrBuf *this_page;                      /* URL of current page */
        StrBuf *PlainArgs; 
+       StrBuf *HostHeader;
 
        HashList *urlstrings;                   /* variables passed to webcit in a URL */
        HashList *HTTPHeaders;                  /* the headers the client sent us */
@@ -559,6 +561,8 @@ struct wcsession {
        int cache_num_floors;
        long *IBSettingsVec;                    /* which icons should be shown / not shown? */
        const StrBuf *floordiv_expanded;        /* which floordiv currently expanded */
+       int ib_wholist_expanded;
+       int ib_roomlist_expanded;
 
 /* Transcoding cache buffers; used to avoid to frequent realloc */
        StrBuf *ConvertBuf1;
@@ -595,6 +599,8 @@ enum {
 #define num_parms(source)              num_tokens(source, '|') 
 #endif
 
+#define site_prefix    (WC ? (WC->Hdr->HostHeader) : NULL)
+
 /* Per-session data */
 #define WC ((struct wcsession *)pthread_getspecific(MyConKey))
 extern pthread_key_t MyConKey;
@@ -620,7 +626,6 @@ extern char wizard_filename[];
 extern int follow_xff;
 extern int num_threads_existing;
 extern int num_threads_executing;
-extern StrBuf *site_prefix;
 
 void InitialiseSemaphores(void);
 void begin_critical_section(int which_one);
@@ -643,6 +648,7 @@ void display_openids(void);
 void display_default_landing_page(void);
 void do_welcome(void);
 void do_logout(void);
+void display_reg(int during_login);
 void display_main_menu(void);
 void display_aide_menu(void);
 void slrp_highest(void);
@@ -658,6 +664,10 @@ int StrBuf_ServGetln(StrBuf *buf);
 int GetServerStatus(StrBuf *Line, long* FullState);
 void serv_puts(const char *string);
 void who(void);
+void push_destination(void);
+void pop_destination(void);
+void robots_txt(void);
+extern void do_404(void);
 
 void ajax_mini_calendar(void);
 void fmout(char *align);