X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit-ng%2Fserver%2Fcaldav_reports.c;h=1c95c380652d39abfd84dbf2ab745f627aba7fcd;hb=eab56df5d120be5d474378f8536837d0abd43214;hp=f042c70311388b6194752a7f40a30374ef097af1;hpb=dd9248637b2d2d26c30ace03a97b2877c49af399;p=citadel.git diff --git a/webcit-ng/server/caldav_reports.c b/webcit-ng/server/caldav_reports.c index f042c7031..1c95c3806 100644 --- a/webcit-ng/server/caldav_reports.c +++ b/webcit-ng/server/caldav_reports.c @@ -224,7 +224,7 @@ void caldav_report(struct http_transaction *h, struct ctdlsession *c) { XML_Parse(xp, h->request_body, h->request_body_length, 1); XML_ParserFree(xp); - if (crp.Chardata != NULL) { // Discard any trailing chardata ... normally nothing here + if (crp.Chardata != NULL) { // Discard any trailing chardata ... normally nothing here FreeStrBuf(&crp.Chardata); crp.Chardata = NULL; } @@ -258,10 +258,15 @@ void caldav_report(struct http_transaction *h, struct ctdlsession *c) { StrBuf *one_item = fetch_ical(c, m); icalcomponent *cal = icalcomponent_new_from_string(ChrPtr(one_item)); - // this is a horrible temporary hack to output every item - int qualify = 1; + // qualify will be set to nonzero if this calendar item is a match for the QUERY. + int qualify = 0; + // this is a horrible temporary hack to output every item (for now) + qualify = 1; + + // Did this calendar item match the query? If so, output it. if (qualify) { + // FIXME need to populate the Href instead of NULL cal_multiget_out(m, NULL, one_item, ReportOut); }