silenced a silly little compiler warning
[citadel.git] / webcit / ical_subst.c
index db30c668971f0292cd48bb3ab814c6eda431b095..420b2e71f7401da22085e7e16f9e4416e1811447 100644 (file)
@@ -272,8 +272,8 @@ void render_MIME_ICS_TPL(StrBuf *Target, WCTemplputParams *TP, StrBuf *FoundChar
        wc_mime_attachment *Mime = CTX(CTX_MIME_ATACH);
        icalproperty_method the_method = ICAL_METHOD_NONE;
        icalproperty *method = NULL;
-       icalcomponent *cal;
-       icalcomponent *c;
+       icalcomponent *cal = NULL;
+       icalcomponent *c = NULL;
         WCTemplputParams SubTP;
         WCTemplputParams SuperTP;
 
@@ -325,7 +325,8 @@ void render_MIME_ICS_TPL(StrBuf *Target, WCTemplputParams *TP, StrBuf *FoundChar
                      0,
                      SuperTP.Tokens);
        FlushStrBuf(Mime->Data);
-       DoTemplate(HKEY("ical_attachment_display"), Mime->Data, &SubTP);
+///    DoTemplate(HKEY("ical_attachment_display"), Mime->Data, &SubTP);
+       DoTemplate(HKEY("ical_edit"), Mime->Data, &SubTP);
 
        /*/ cal_process_object(Mime->Data, cal, 0, Mime->msgnum, ChrPtr(Mime->PartNum)); */
 
@@ -417,7 +418,7 @@ HashList *iterate_FindConflict(StrBuf *Target, WCTemplputParams *TP)
                                Done = 1;
                        }
                        else {
-                               Conflict = (CalendarConflict *) malloc(sizeof(CalendarConflict *));
+                               Conflict = (CalendarConflict *) malloc(sizeof(CalendarConflict));
                                Conflict->conflict_event_uid = NewStrBufPlain(NULL, StrLength(Line));
                                Conflict->conflict_event_summary = NewStrBufPlain(NULL, StrLength(Line));
 
@@ -432,7 +433,8 @@ HashList *iterate_FindConflict(StrBuf *Target, WCTemplputParams *TP)
                                Pos = NULL;
                        }
        }
-       syslog(9, "...done.\n");
+       FreeStrBuf(&Line);
+       syslog(LOG_DEBUG, "...done.\n");
        return Conflicts;
 }
 
@@ -536,7 +538,7 @@ int cond_ICalAttendeeState(StrBuf *Target, WCTemplputParams *TP)
        for (c = icalcomponent_get_first_component(cal, ICAL_ANY_COMPONENT);
             (c != 0);
             c = icalcomponent_get_next_component(cal, ICAL_ANY_COMPONENT)) {
-               /* Recursively process subcomponent * /
+               // Recursively process subcomponent
                cal_process_object(Target, c, recursion_level+1, msgnum, cal_partnum);
        }
        */
@@ -547,10 +549,10 @@ InitModule_ICAL_SUBST
 (void)
 {
        RegisterCTX(CTX_ICAL);
-//*
+/*
        RegisterMimeRenderer(HKEY("text/calendar"), render_MIME_ICS_TPL, 1, 501);
        RegisterMimeRenderer(HKEY("application/ics"), render_MIME_ICS_TPL, 1, 500);
-//*/
+*/
 
        CreateIcalComponendKindLookup ();
        RegisterConditional("COND:ICAL:PROPERTY", 1, cond_ICalHaveItem, CTX_ICAL);