/*
* $Id$
- */
-/**
- * \defgroup WebServerII some of the webserver stuff.
+ *
* This is the other half of the webserver. It handles the task of hooking
* up HTTP requests with the sessions they belong to, using HTTP cookies to
* keep track of things. If the HTTP request doesn't belong to any currently
* active session, a new session is started.
- * \ingroup WebcitHttpServer
*
*/
-/*@{*/
+
#include "webcit.h"
#include "webserver.h"
-/** Only one thread may manipulate SessionList at a time... */
+/* Only one thread may manipulate SessionList at a time... */
pthread_mutex_t SessionListMutex;
struct wcsession *SessionList = NULL; /**< our sessions ????*/
pthread_key_t MyConKey; /**< TSD key for MySession() */
-/**
- * \brief free the memory used for viewing atachments
- * \param sess the session object to destroy
+/*
+ * free the memory used for viewing atachments
*/
void free_attachments(struct wcsession *sess) {
struct wc_attachment *att;
sptr->killthis = 1;
}
}
-/**
- * \brief what??????
- */
+
void do_housekeeping(void)
{
struct wcsession *sptr, *ss;
}
-/**
- * \brief Collapse multiple cookies on one line
- * \param sock a socket?
- * \param buf some bunch of chars?
- * \param hold hold what?
- * TODO: get this comment right
+/*
+ * Collapse multiple cookies on one line
*/
int req_gets(int sock, char *buf, char *hold)
{
return(0);
}
-/**
- * \brief close some fd for some reason???
- * \param fd the fd to close??????
+/*
* lingering_close() a`la Apache. see
* http://www.apache.org/docs/misc/fin_wait_2.html for rationale
- * TODO: get this comment precise.
*/
-
int lingering_close(int fd)
{
char buf[SIZ];
session_is_new = 1;
}
- /**
+ /*
* A future improvement might be to check the session integrity
* at this point before continuing.
*/
- /**
+ /*
* Bind to the session and perform the transaction
*/
- pthread_mutex_lock(&TheSession->SessionMutex); /*< bind */
+ pthread_mutex_lock(&TheSession->SessionMutex); /* bind */
pthread_setspecific(MyConKey, (void *)TheSession);
TheSession->http_sock = sock;
- TheSession->lastreq = time(NULL); /*< log */
+ TheSession->lastreq = time(NULL); /* log */
TheSession->gzip_ok = gzip_ok;
#ifdef ENABLE_NLS
if (session_is_new) {
httplang_to_locale(accept_language);
}
- go_selected_language(); /*< set locale */
+ go_selected_language(); /* set locale */
#endif
- session_loop(req); /*< do transaction */
+ session_loop(req); /* do transaction */
#ifdef ENABLE_NLS
- stop_selected_language(); /*< unset locale */
+ stop_selected_language(); /* unset locale */
#endif
- pthread_mutex_unlock(&TheSession->SessionMutex); /*< unbind */
+ pthread_mutex_unlock(&TheSession->SessionMutex); /* unbind */
- /** Free the request buffer */
+ /* Free the request buffer */
while (req != NULL) {
hptr = req->next;
free(req);
req = hptr;
}
- /**
+ /*
* Free up any session-local substitution variables which
* were set during this transaction
*/
clear_local_substs();
}
-/*@}*/
/*
* $Id$
- */
-/**
- * \defgroup IcalDezonify normalize ical dates to UTC
+ *
* Function to go through an ical component set and convert all non-UTC
* date/time properties to UTC. It also strips out any VTIMEZONE
* subcomponents afterwards, because they're irrelevant.
* Everything here will work on both a fully encapsulated VCALENDAR component
* or any type of subcomponent.
*
- * \ingroup Calendaring
*/
-/*@{*/
#include "webcit.h"
#include "webserver.h"
icalparameter *param;
const char *tzid = NULL;
struct icaltimetype TheTime;
- int utc_declared_as_tzid = 0; /**< Component declared 'TZID=GMT' instead of using Z syntax */
+ int utc_declared_as_tzid = 0; /* Component declared 'TZID=GMT' instead of using Z syntax */
/* Give me nothing and I will give you nothing in return. */
if (cal == NULL) return;
/* Convert it to an icaltimezone type. */
if (tzid != NULL) {
- /* lprintf(9, " * Stringy supplied timezone is: '%s'\n", tzid); */
+ lprintf(9, " * Stringy supplied timezone is: '%s'\n", tzid);
if ( (!strcasecmp(tzid, "UTC")) || (!strcasecmp(tzid, "GMT")) ) {
utc_declared_as_tzid = 1;
- /* lprintf(9, " * ...and we handle that internally.\n"); */
+ lprintf(9, " * ...and we handle that internally.\n");
}
else {
t = icalcomponent_get_timezone(cal, tzid);
- /* lprintf(9, " * ...and I %s have tzdata for that zone.\n",
+ lprintf(9, " * ...and I %s have tzdata for that zone.\n",
(t ? "DO" : "DO NOT")
- ); */
+ );
}
}
return;
}
- /* lprintf(9, " * Was: %s\n", icaltime_as_ical_string(TheTime)); */
+ lprintf(9, " * Was: %s\n", icaltime_as_ical_string(TheTime));
if (TheTime.is_utc) {
- /* lprintf(9, " * This property is ALREADY UTC.\n"); */
+ lprintf(9, " * This property is ALREADY UTC.\n");
}
else if (utc_declared_as_tzid) {
- /* lprintf(9, " * Replacing '%s' TZID with 'Z' suffix.\n", tzid); */
+ lprintf(9, " * Replacing '%s' TZID with 'Z' suffix.\n", tzid);
TheTime.is_utc = 1;
}
else {
/* Do the conversion. */
if (t != NULL) {
- /* lprintf(9, " * Timezone prop found. Converting to UTC.\n"); */
+ lprintf(9, " * Timezone prop found. Converting to UTC.\n");
}
else {
- /* lprintf(9, " * Converting default timezone to UTC.\n"); */
+ lprintf(9, " * Converting default timezone to UTC.\n");
}
if (t == NULL) {
}
icalproperty_remove_parameter_by_kind(prop, ICAL_TZID_PARAMETER);
- /* lprintf(9, " * Now: %s\n", icaltime_as_ical_string(TheTime)); */
+ lprintf(9, " * Now: %s\n", icaltime_as_ical_string(TheTime));
/* Now add the converted property back in. */
if (icalproperty_isa(prop) == ICAL_DTSTART_PROPERTY) {
void ical_dezonify(icalcomponent *cal) {
icalcomponent *vt = NULL;
- /* lprintf(9, "ical_dezonify() started\n"); */
+ lprintf(9, "ical_dezonify() started\n");
/* Convert all times to UTC */
ical_dezonify_recurse(cal, cal);
icalcomponent_free(vt);
}
- /* lprintf(9, "ical_dezonify() completed\n"); */
+ lprintf(9, "ical_dezonify() completed\n");
}
// Yank out the bits we want to change
RoomFlags.flags2 = RoomFlags.flags2 &
- !(QR2_SELFLIST|QR2_SUBSONLY|QR2_MODERATED);
+ !(QR2_SELFLIST|QR2_SMTP_PUBLIC|QR2_MODERATED);
- if (!strcmp(bstr("QR2_SelfList"), "yes"))
+ if (!strcasecmp(bstr("QR2_SelfList"), "yes"))
RoomFlags.flags2 = RoomFlags.flags2 | QR2_SELFLIST;
- if (!strcmp(bstr("QR2_SubsOnly"), "yes"))
- RoomFlags.flags2 = RoomFlags.flags2 | QR2_SUBSONLY;
- if (!strcmp(bstr("QR2_Moderated"), "yes"))
+ if (!strcasecmp(bstr("QR2_SMTP_PUBLIC"), "yes"))
+ RoomFlags.flags2 = RoomFlags.flags2 | QR2_SMTP_PUBLIC;
+ if (!strcasecmp(bstr("QR2_Moderated"), "yes"))
RoomFlags.flags2 = RoomFlags.flags2 | QR2_MODERATED;
set_roomflags (&RoomFlags);