diff --git a/SoObjects/Appointments/SOGoWebAppointmentFolder.h b/SoObjects/Appointments/SOGoWebAppointmentFolder.h index c47098d5a..45e5da636 100644 --- a/SoObjects/Appointments/SOGoWebAppointmentFolder.h +++ b/SoObjects/Appointments/SOGoWebAppointmentFolder.h @@ -27,10 +27,6 @@ #import "SOGoAppointmentFolder.h" @interface SOGoWebAppointmentFolder : SOGoAppointmentFolder -{ - @public - NSMutableData *buffer; -} - (void) setUsername: (NSString *) username andPassword: (NSString *) password; diff --git a/SoObjects/Appointments/SOGoWebAppointmentFolder.m b/SoObjects/Appointments/SOGoWebAppointmentFolder.m index edb6fc887..7df951a00 100644 --- a/SoObjects/Appointments/SOGoWebAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoWebAppointmentFolder.m @@ -46,12 +46,12 @@ @class WOHTTPURLHandle; -size_t curl_body_function(void *ptr, size_t size, size_t nmemb, void *inSelf) +size_t curl_body_function(void *ptr, size_t size, size_t nmemb, void *buffer) { size_t total; total = size * nmemb; - [((SOGoWebAppointmentFolder *)inSelf)->buffer appendBytes: ptr length: total]; + [(NSMutableData *)buffer appendBytes: ptr length: total]; return total; } @@ -115,16 +115,17 @@ size_t curl_body_function(void *ptr, size_t size, size_t nmemb, void *inSelf) - (NSDictionary *) loadWebCalendar { - NSString *location, *httpauth; + NSString *location, *httpauth, *content, *newDisplayName; + NSMutableDictionary *result; NSDictionary *authInfos; + iCalCalendar *calendar; + NSMutableData *buffer; NSURL *url; CURL *curl; - CURLcode rc; - char error[CURL_ERROR_SIZE]; - NSMutableDictionary *result; - NSString *content, *newDisplayName; - iCalCalendar *calendar; + NSUInteger imported, status; + char error[CURL_ERROR_SIZE]; + CURLcode rc; result = [NSMutableDictionary dictionary]; @@ -155,7 +156,7 @@ size_t curl_body_function(void *ptr, size_t size, size_t nmemb, void *inSelf) buffer = [NSMutableData data]; curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, curl_body_function); - curl_easy_setopt(curl, CURLOPT_WRITEDATA, self); + curl_easy_setopt(curl, CURLOPT_WRITEDATA, buffer); error[0] = 0; curl_easy_setopt (curl, CURLOPT_ERRORBUFFER, &error);