+
+ // Root element IS a component and the root filter is "comp-filter" -- see if it matches the requested type
+ if ( (icalcomponent_isa_component(cal))
+ && (level == 0)
+ && (!strcasecmp(t[2], "name"))
+ ) {
+ if (icalcomponent_isa(cal) != icalcomponent_string_to_kind(t[3]) ) {
+ syslog(LOG_DEBUG, "caldav: root component is <%s>, looking for <%s>, rejecting",
+ icalcomponent_kind_to_string(icalcomponent_isa(cal)), t[3]
+ );
+ return(0);
+ }
+ }
+