From: <dg...@su...> - 2009-01-19 18:14:29
|
Author: savago Date: Mon Jan 19 19:13:27 2009 New Revision: 5192 URL: http://www.opensync.org/changeset/5192 Log: Removing commented code (trying to keep code clean and sane). Modified: plugins/google-calendar/src/gcalendar.c Modified: plugins/google-calendar/src/gcalendar.c ============================================================================== --- plugins/google-calendar/src/gcalendar.c Mon Jan 19 19:10:32 2009 (r5191) +++ plugins/google-calendar/src/gcalendar.c Mon Jan 19 19:13:27 2009 (r5192) @@ -203,7 +203,6 @@ struct gc_plgdata *plgdata = data; char slow_sync_flag = 0; OSyncError *error = NULL; - /* OSyncXMLFormat *xmlformat; */ OSyncData *odata = NULL; OSyncChange *chg = NULL; int result = 0, i; @@ -287,22 +286,6 @@ goto error; raw_xml = plgdata->xslt_ctx_gcal->xml_str; - /* - xmlformat = osync_xmlformat_parse(raw_xml, - strlen(raw_xml), - &error); - if (!xmlformat) - goto error; - - osync_trace(TRACE_INTERNAL, "gevent: %s\nosync: %s\n", - gcal_event_get_xml(event), raw_xml); - - osync_xmlformat_sort(xmlformat); - odata = osync_data_new(xmlformat, - osync_xmlformat_size(), - plgdata->gcal_format, &error); - */ - odata = osync_data_new(raw_xml, strlen(raw_xml), plgdata->gcal_format, &error); @@ -349,7 +332,6 @@ cleanup: osync_error_unref(&error); - /* osync_xmlformat_unref(&xmlformat); */ error: osync_context_report_error(ctx, OSYNC_ERROR_GENERIC, msg); @@ -365,7 +347,6 @@ struct gc_plgdata *plgdata = data; char slow_sync_flag = 0; OSyncError *error = NULL; - /* OSyncXMLFormat *xmlformat; */ OSyncData *odata = NULL; OSyncChange *chg = NULL; int result = 0, i; @@ -451,23 +432,6 @@ goto error; raw_xml = plgdata->xslt_ctx_gcont->xml_str; - /* - xmlformat = osync_xmlformat_parse(raw_xml, - strlen(raw_xml), - &error); - if (!xmlformat) - goto error; - - osync_trace(TRACE_INTERNAL, "gcont: %s\nosync: %s\n", - gcal_contact_get_xml(contact), raw_xml); - - osync_xmlformat_sort(xmlformat); - - odata = osync_data_new(xmlformat, - osync_xmlformat_size(), - plgdata->gcont_format, &error); - */ - odata = osync_data_new(raw_xml, strlen(raw_xml), plgdata->gcont_format, &error); @@ -514,7 +478,6 @@ cleanup: osync_error_unref(&error); - /* osync_xmlformat_unref(&xmlformat); */ error: osync_context_report_error(ctx, OSYNC_ERROR_GENERIC, msg); @@ -531,28 +494,12 @@ int size, result; char *osync_xml = NULL, *msg = NULL, *raw_xml = NULL, *updated_event = NULL; OSyncData *odata = NULL; - /* OSyncXMLFormat *xmlformat = NULL; */ if (!(odata = osync_change_get_data(change))) { msg = "Cannot get raw data from change obj!\n"; goto error; } - //void osync_data_get_data(OSyncData *data, char **buffer, unsigned int *size) - /* - osync_data_get_data(odata, &xmlformat, &size); - if (!osync_xml) { - msg = "Failed getting xmlobj from change obj!\n"; - goto error; - } - - osync_xmlformat_assemble(xmlformat, &osync_xml, &size); - if (!osync_xml) { - msg = "Failed getting xml from xmlobj!\n"; - goto error; - } - */ - osync_data_get_data(odata, &osync_xml, &size); if (!osync_xml) { msg = "Failed getting xml from xmlobj!\n"; @@ -655,27 +602,12 @@ int size, result; char *osync_xml = NULL, *msg = NULL, *raw_xml = NULL, *updated_contact = NULL; OSyncData *odata = NULL; - /* OSyncXMLFormat *xmlformat = NULL; */ if (!(odata = osync_change_get_data(change))) { msg = "Cannot get raw data from change obj!\n"; goto error; } - /* - osync_data_get_data(odata, &xmlformat, &size); - if (!xmlformat) { - msg = "Failed getting xmlobj from change obj!\n"; - goto error; - } - - osync_xmlformat_assemble(xmlformat, &osync_xml, &size); - if (!osync_xml) { - msg = "Failed getting xml from xmlobj!\n"; - goto error; - } - */ - osync_data_get_data(odata, &osync_xml, &size); if (!osync_xml) { msg = "Failed getting xml from xmlobj!\n"; |