(xmlChar *)syncstate);
child = xmlNewTextChild (node, messages_ns, (xmlChar *)"MaxChangesReturned",
- (xmlChar *)"5");
+ (xmlChar *)"50");
buf = xmlAllocOutputBuffer(NULL);
xmlNodeDumpOutput(buf, doc, xmlDocGetRootElement(doc), 0, 1, NULL);
doc = xmlReadMemory (msg->response_body->data, msg->response_body->length,
"syncresponse.xml", NULL, 0);
if (!doc) {
- fprintf(stderr, "Failed to parse autodiscover response XML\n");
+ fprintf(stderr, "Failed to parse SyncFolderItems response XML\n");
exit(1);
}
node = xmlDocGetRootElement(doc);
g_file_set_contents(statefilename, syncstate, strlen(syncstate), NULL);
return 0;
}
+
int fetch_xml_item(SoupSession *sess, char *url, const char *itemid,
const char *xml_filename, const char *ics_filename)
{
doc = xmlReadMemory (msg->response_body->data, msg->response_body->length,
"syncresponse.xml", NULL, 0);
if (!doc) {
- fprintf(stderr, "Failed to parse autodiscover response XML\n");
+ fprintf(stderr, "Failed to parse GetItem response XML\n");
exit(1);
}
node = xmlDocGetRootElement(doc);
xmlNodeGetContent(node));
}
}
- exit(1);
+ /* Don't abort the whole sync run just for this */
+ xmlFreeDoc(doc);
+ return 0;
} else if (strcmp(responseclass, "Success")) {
fprintf(stderr, "Unknown response class '%s' from server\n",
responseclass);
if (!calcomp) {
printf("Failed to parse calendar: %s\n", error->message);
g_clear_error(&error);
- return -1;
+ return 0;
}
outbuf = icalcomponent_as_ical_string_r(calcomp);