48 // initialize |
48 // initialize |
49 DavContext *context = calloc(1, sizeof(DavContext)); |
49 DavContext *context = calloc(1, sizeof(DavContext)); |
50 if(!context) { |
50 if(!context) { |
51 return NULL; |
51 return NULL; |
52 } |
52 } |
53 context->sessions = cxLinkedListCreate(cxDefaultAllocator, cx_cmp_intptr, CX_STORE_POINTERS); |
53 context->sessions = cxLinkedListCreate(cxDefaultAllocator, cx_cmp_ptr, CX_STORE_POINTERS); |
54 cxDefineDestructor(context->sessions, dav_session_destructor); |
54 cxDefineDestructor(context->sessions, dav_session_destructor); |
55 context->http_proxy = calloc(1, sizeof(DavProxy)); |
55 context->http_proxy = calloc(1, sizeof(DavProxy)); |
56 if(!context->http_proxy) { |
56 if(!context->http_proxy) { |
57 dav_context_destroy(context); |
57 dav_context_destroy(context); |
58 return NULL; |
58 return NULL; |