Revision
16643
Author
anthm
Date
2010-02-15 11:11:14 -0600 (Mon, 15 Feb 2010)

Log Message

XML-16

Modified Paths

Diff

Modified: freeswitch/trunk/src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c (16642 => 16643)


--- freeswitch/trunk/src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c	2010-02-15 10:34:55 UTC (rev 16642)
+++ freeswitch/trunk/src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c	2010-02-15 17:11:14 UTC (rev 16643)
@@ -61,6 +61,7 @@
 	char *ssl_cacert_file;
 	uint32_t enable_ssl_verifyhost;
 	int encode;
+	int log_http_and_disk;
 	int log_b;
 	int prefix_a;
 	int disable100continue;
@@ -222,7 +223,7 @@
 		logdir = globals.log_dir;
 	}
 
-	if (!zstr(logdir) && !globals.url_count) {
+	if (!zstr(logdir) && (globals.log_http_and_disk || !globals.url_count)) {
 		path = switch_mprintf("%s%s%s%s.cdr.xml", logdir, SWITCH_PATH_SEPARATOR, a_prefix, switch_core_session_get_uuid(session));
 		switch_thread_rwlock_unlock(globals.log_path_lock);
 		if (path) {
@@ -465,6 +466,7 @@
 	}
 
 	memset(&globals, 0, sizeof(globals));
+	globals.log_http_and_disk = 0;
 	globals.log_b = 1;
 	globals.disable100continue = 0;
 	globals.pool = pool;
@@ -491,6 +493,8 @@
 				} else {
 					globals.urls[globals.url_count++] = switch_core_strdup(globals.pool, val);
 				}
+			} else if (!strcasecmp(var, "log-http-and-disk")) {
+				globals.log_http_and_disk = switch_true(val);
 			} else if (!strcasecmp(var, "delay") && !zstr(val)) {
 				globals.delay = (uint32_t) atoi(val);
 			} else if (!strcasecmp(var, "log-b-leg")) {