+ FreeStrBuf(&c->conflict_event_uid);
+ FreeStrBuf(&c->conflict_event_summary);
+ free(c);
+}
+HashList *iterate_FindConflict(StrBuf *Target, WCTemplputParams *TP)
+{
+ StrBuf *Line;
+ HashList *Conflicts = NULL;
+ CalendarConflict *Conflict;
+ wc_mime_attachment *Mime = (wc_mime_attachment *) CTX(CTX_MIME_ATACH);
+
+ serv_printf("ICAL conflicts|%ld|%s|", Mime->msgnum, ChrPtr(Mime->PartNum));
+
+ Line = NewStrBuf();
+ StrBuf_ServGetln(Line);
+ if (GetServerStatus(Line, NULL) == 1)
+ {
+ const char *Pos = NULL;
+ int Done = 0;
+ int n = 0;
+ Conflicts = NewHash(1, Flathash);
+ while(!Done && (StrBuf_ServGetln(Line) >= 0) )
+ if ( (StrLength(Line)==3) &&
+ !strcmp(ChrPtr(Line), "000"))
+ {
+ Done = 1;
+ }
+ else {
+ Conflict = (CalendarConflict *) malloc(sizeof(CalendarConflict));
+ Conflict->conflict_event_uid = NewStrBufPlain(NULL, StrLength(Line));
+ Conflict->conflict_event_summary = NewStrBufPlain(NULL, StrLength(Line));
+
+ Conflict->existing_msgnum = StrBufExtractNext_long(Line, &Pos, '|');
+ StrBufSkip_NTokenS(Line, &Pos, '|', 1);
+ StrBufExtract_NextToken(Conflict->conflict_event_uid, Line, &Pos, '|');
+ StrBufExtract_NextToken(Conflict->conflict_event_summary, Line, &Pos, '|');
+ Conflict->is_update = StrBufExtractNext_long(Line, &Pos, '|');
+
+ Put(Conflicts, IKEY(n), Conflict, DeleteConflict);
+ n++;
+ Pos = NULL;
+ }
+ }
+ FreeStrBuf(&Line);
+ syslog(LOG_DEBUG, "...done.\n");
+ return Conflicts;
+}