int ConditionalAide(StrBuf *Target, WCTemplputParams *TP)
{
- return (WC->is_aide == 0);
+ wcsession *WCC = WC;
+ return (WCC != NULL)? (WC->is_aide == 0) : 0;
}
int ConditionalRoomAide(StrBuf *Target, WCTemplputParams *TP)
{
- return (WC->is_room_aide == 0);
+ wcsession *WCC = WC;
+ return (WCC != NULL)? (WCC->is_room_aide == 0) : 0;
}
-int ConditionalIsLoggedIn(StrBuf *Target, WCTemplputParams *TP) {
- return (WC->logged_in == 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;
- return ( (WCC->is_room_aide) || (WCC->is_mailbox) || (WCC->room_flags2 & QR2_COLLABDEL) );
+ return (WCC != NULL)? ( (WCC->is_room_aide) || (WCC->is_mailbox) || (WCC->room_flags2 & QR2_COLLABDEL) ) : 0;
}
Hdr->HR.DontNeedAuth = (Hdr->HR.Handler->Flags & ISSTATIC) != 0;
}
- Hdr->HTTPHeaders = NewHash(1, NULL);
return 0;
}
continue;
}
if (nLine == 1) {
+ Hdr->HTTPHeaders = NewHash(1, NULL);
pHdr = (OneHttpHeader*) malloc(sizeof(OneHttpHeader));
memset(pHdr, 0, sizeof(OneHttpHeader));
pHdr->Val = Line;
WCC->wc_view = VIEW_MAILBOX;
if (!WCC->is_ajax) {
- output_headers(1, 1, 1, 0, 0, 0);
+ output_headers(1, 1, 1, 0, 0, 0);
} else if (WCC->wc_view == VIEW_MAILBOX) {
- jsonMessageListHdr();
+ jsonMessageListHdr();
}
switch (WCC->wc_view) {