From: Art Cancro Date: Mon, 31 Dec 2007 05:37:16 +0000 (+0000) Subject: * Cleaned up some misc comments X-Git-Tag: v7.86~2628 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=435faa62a4b8f943a48cfe05593b379399e4a073 * Cleaned up some misc comments * Re-enabled the verbose logging for ical_dezonify() in an attempt to figure out what the f**k is going on with timezones all of a sudden. --- diff --git a/webcit/context_loop.c b/webcit/context_loop.c index a74ffb31e..032c82a60 100644 --- a/webcit/context_loop.c +++ b/webcit/context_loop.c @@ -1,20 +1,17 @@ /* * $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 ????*/ @@ -22,9 +19,8 @@ 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; @@ -46,9 +42,7 @@ void shutdown_sessions(void) sptr->killthis = 1; } } -/** - * \brief what?????? - */ + void do_housekeeping(void) { struct wcsession *sptr, *ss; @@ -160,12 +154,8 @@ int GenerateSessionID(void) } -/** - * \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) { @@ -201,14 +191,10 @@ 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]; @@ -494,42 +480,41 @@ void context_loop(int sock) 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(); } -/*@}*/ diff --git a/webcit/ical_dezonify.c b/webcit/ical_dezonify.c index 509c8deb9..afcd17d11 100644 --- a/webcit/ical_dezonify.c +++ b/webcit/ical_dezonify.c @@ -1,8 +1,6 @@ /* * $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. @@ -10,9 +8,7 @@ * Everything here will work on both a fully encapsulated VCALENDAR component * or any type of subcomponent. * - * \ingroup Calendaring */ -/*@{*/ #include "webcit.h" #include "webserver.h" @@ -55,7 +51,7 @@ void ical_dezonify_backend(icalcomponent *cal, 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; @@ -69,16 +65,16 @@ void ical_dezonify_backend(icalcomponent *cal, /* 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") - ); */ + ); } } @@ -102,24 +98,24 @@ void ical_dezonify_backend(icalcomponent *cal, 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) { @@ -139,7 +135,7 @@ void ical_dezonify_backend(icalcomponent *cal, } 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) { @@ -205,7 +201,7 @@ void ical_dezonify_recurse(icalcomponent *cal, icalcomponent *rcal) { 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); @@ -217,7 +213,7 @@ void ical_dezonify(icalcomponent *cal) { icalcomponent_free(vt); } - /* lprintf(9, "ical_dezonify() completed\n"); */ + lprintf(9, "ical_dezonify() completed\n"); } diff --git a/webcit/roomops.c b/webcit/roomops.c index 13de9a3de..bc6e81053 100644 --- a/webcit/roomops.c +++ b/webcit/roomops.c @@ -2022,13 +2022,13 @@ void toggle_self_service(void) { // 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);