Log an error message when ical_encapsulate_subcomponent() is
authorArt Cancro <ajc@citadel.org>
Mon, 1 Dec 2008 21:40:26 +0000 (21:40 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 1 Dec 2008 21:40:26 +0000 (21:40 +0000)
called with a component that is already a top-level VCALENDAR

webcit/calendar_tools.c

index ae4b09ee511ada8c7f23be3bc39313b7285d1175..07faad27ba6dd5b5697902adfd12703898586a9e 100644 (file)
@@ -241,10 +241,10 @@ icalcomponent *ical_encapsulate_subcomponent(icalcomponent *subcomp) {
        }
 
        /*
-        * If we're already looking at a full VCALENDAR component,
-        * don't bother ... just return itself.
+        * If we're already looking at a full VCALENDAR component, this is probably an error.
         */
        if (icalcomponent_isa(subcomp) == ICAL_VCALENDAR_COMPONENT) {
+               lprintf(3, "ERROR: component sent to ical_encapsulate_subcomponent() already top level\n");
                return subcomp;
        }