* room on a Citadel server. It handles iCalendar objects using the
* iTIP protocol. See RFCs 2445 and 2446.
*
+ *
+ * Copyright (c) 1987-2009 by the citadel.org team
+ *
+ * This program is free 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 PRODID "-//Citadel//NONSGML Citadel Calendar//EN"
const icaltimezone *z;
int num_zones_attached = 0;
int zone_already_attached;
+ icalparameter *tzidp = NULL;
+ const char *tzidc = NULL;
if (cal == NULL) {
CtdlLogPrintf(CTDL_ERR, "ERROR: trying to reply to NULL event?\n");
) {
t = icalproperty_get_dtstart(p); // it's safe to use dtstart for all of them
+ /* Determine the tzid in order for some of the conditions below to work */
+ tzidp = icalproperty_get_first_parameter(p, ICAL_TZID_PARAMETER);
+ if (tzidp) {
+ tzidc = icalparameter_get_tzid(tzidp);
+ }
+ else {
+ tzidc = NULL;
+ }
+
/* First see if there's a timezone attached to the data structure itself */
if (icaltime_is_utc(t)) {
z = icaltimezone_get_utc_timezone();
}
/* If not, try to determine the tzid from the parameter using attached zones */
- if (!z) {
- z = icalcomponent_get_timezone(top_level_cal,
- icalparameter_get_tzid(
- icalproperty_get_first_parameter(p, ICAL_TZID_PARAMETER)
- )
- );
+ if ((!z) && (tzidc)) {
+ z = icalcomponent_get_timezone(top_level_cal, tzidc);
}
/* Still no good? Try our internal database */
- if (!z) {
- z = icaltimezone_get_builtin_timezone_from_tzid(
- icalparameter_get_tzid(
- icalproperty_get_first_parameter(p, ICAL_TZID_PARAMETER)
- )
- );
+ if ((!z) && (tzidc)) {
+ z = icaltimezone_get_builtin_timezone_from_tzid(tzidc);
}
if (z) {
serialized_request
);
- msg = CtdlMakeMessage(&CC->user,
- "", /* No single recipient here */
- "", /* No single recipient here */
- CC->room.QRname, 0, FMT_RFC822,
- "",
- "",
+ msg = CtdlMakeMessage(
+ &CC->user,
+ NULL, /* No single recipient here */
+ NULL, /* No single recipient here */
+ CC->room.QRname,
+ 0,
+ FMT_RFC822,
+ NULL,
+ NULL,
summary_string, /* Use summary for subject */
NULL,
request_message_text,
- NULL);
+ NULL
+ );
if (msg != NULL) {
valid = validate_recipients(attendees_string, NULL, 0);