]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
cleanup
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 13 May 2011 20:56:43 +0000 (15:56 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 13 May 2011 20:56:43 +0000 (15:56 -0500)
src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c

index e49d1d958e625b2636768cdbaffd75c7c1dbef66..279bcda2d53af4075ae20aa6a99abb86769bd34b 100644 (file)
@@ -32,7 +32,7 @@
  */
 #include <sys/stat.h>
 #include <switch.h>
-#include <curl/curl.h>
+#include <switch_curl.h>
 #define MAX_URLS 20
 
 #define ENCODING_NONE 0
@@ -610,6 +610,11 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_xml_cdr_load)
        set_xml_cdr_log_dirs();
 
        switch_xml_free(xml);
+
+       if (status == SWITCH_STATUS_SUCCESS) {
+               switch_curl_init();
+       }
+
        return status;
 }
 
@@ -626,6 +631,8 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_xml_cdr_shutdown)
 
        switch_thread_rwlock_destroy(globals.log_path_lock);
 
+       switch_curl_destroy();
+
        return SWITCH_STATUS_SUCCESS;
 }