[asterisk-commits] mjordan: branch mjordan/cdrs-of-doom r388691 - in /team/mjordan/cdrs-of-doom:...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue May 14 11:19:38 CDT 2013


Author: mjordan
Date: Tue May 14 11:19:36 2013
New Revision: 388691

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=388691
Log:
Commit so I can do the merge dance

Modified:
    team/mjordan/cdrs-of-doom/apps/app_cdr.c
    team/mjordan/cdrs-of-doom/funcs/func_cdr.c
    team/mjordan/cdrs-of-doom/include/asterisk/cdr.h
    team/mjordan/cdrs-of-doom/main/cdr.c
    team/mjordan/cdrs-of-doom/res/res_stasis.c
    team/mjordan/cdrs-of-doom/tests/test_cdr.c

Modified: team/mjordan/cdrs-of-doom/apps/app_cdr.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/cdrs-of-doom/apps/app_cdr.c?view=diff&rev=388691&r1=388690&r2=388691
==============================================================================
--- team/mjordan/cdrs-of-doom/apps/app_cdr.c (original)
+++ team/mjordan/cdrs-of-doom/apps/app_cdr.c Tue May 14 11:19:36 2013
@@ -123,10 +123,9 @@
 		ast_app_parse_options(resetcdr_opts, &flags, NULL, args);
 	}
 
-	if (ast_test_flag(&flags, AST_CDR_FLAG_DISABLE_ALL)) {
-		if (ast_cdr_clear_property(ast_channel_name(chan), AST_CDR_FLAG_DISABLE_ALL)) {
-			res = 1;
-		}
+	if (ast_test_flag(&flags, AST_CDR_FLAG_DISABLE_ALL) &&
+		ast_cdr_clear_property(ast_channel_name(chan), AST_CDR_FLAG_DISABLE_ALL)) {
+		res = 1;
 	}
 	if (ast_cdr_reset(ast_channel_name(chan), &flags)) {
 		res = 1;

Modified: team/mjordan/cdrs-of-doom/funcs/func_cdr.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/cdrs-of-doom/funcs/func_cdr.c?view=diff&rev=388691&r1=388690&r2=388691
==============================================================================
--- team/mjordan/cdrs-of-doom/funcs/func_cdr.c (original)
+++ team/mjordan/cdrs-of-doom/funcs/func_cdr.c Tue May 14 11:19:36 2013
@@ -206,14 +206,15 @@
 {
 	char format_buf[128];
 	struct ast_flags flags = { 0 };
-	RAII_VAR(char *, tempbuf, ast_malloc(128), ast_free);
+	char tempbuf[128];
+	/*RAII_VAR(char *, tempbuf, ast_malloc(128), ast_free);*/
 	char *info;
 	AST_DECLARE_APP_ARGS(args,
 			     AST_APP_ARG(variable);
 			     AST_APP_ARG(options);
 	);
 
-	if (!chan || !tempbuf) {
+	if (!chan) {
 		return -1;
 	}
 
@@ -228,7 +229,7 @@
 		ast_app_parse_options(cdr_func_options, &flags, NULL, args.options);
 	}
 
-	if (ast_cdr_getvar(ast_channel_name(chan), args.variable, &tempbuf, sizeof(*tempbuf))) {
+	if (ast_cdr_getvar(ast_channel_name(chan), args.variable, tempbuf, sizeof(*tempbuf))) {
 		return 0;
 	}
 

Modified: team/mjordan/cdrs-of-doom/include/asterisk/cdr.h
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/cdrs-of-doom/include/asterisk/cdr.h?view=diff&rev=388691&r1=388690&r2=388691
==============================================================================
--- team/mjordan/cdrs-of-doom/include/asterisk/cdr.h (original)
+++ team/mjordan/cdrs-of-doom/include/asterisk/cdr.h Tue May 14 11:19:36 2013
@@ -356,7 +356,7 @@
  * \retval 0 on success
  * \retval non-zero on failure
  */
-int ast_cdr_getvar(const char *channel_name, const char *name, char **value, size_t length);
+int ast_cdr_getvar(const char *channel_name, const char *name, char *value, size_t length);
 
 /*!
  * \since 12

Modified: team/mjordan/cdrs-of-doom/main/cdr.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/cdrs-of-doom/main/cdr.c?view=diff&rev=388691&r1=388690&r2=388691
==============================================================================
--- team/mjordan/cdrs-of-doom/main/cdr.c (original)
+++ team/mjordan/cdrs-of-doom/main/cdr.c Tue May 14 11:19:36 2013
@@ -2550,78 +2550,77 @@
 /*!
  * \brief Format a variable on a \ref cdr_object
  */
-static void cdr_object_format_var_internal(struct cdr_object *cdr, const char *name, char **value, size_t length)
+static void cdr_object_format_var_internal(struct cdr_object *cdr, const char *name, char *value, size_t length)
 {
 	struct ast_var_t *variable;
 
 	AST_LIST_TRAVERSE(&cdr->party_a.variables, variable, entries) {
 		if (!strcasecmp(name, ast_var_name(variable))) {
-			ast_copy_string(*value, ast_var_value(variable), length);
+			ast_copy_string(value, ast_var_value(variable), length);
 			return;
 		}
 	}
-
-	**value = '\0';
+	*value = '\0';
 }
 
 /*!
  * \brief Format one of the standard properties on a \ref cdr_object
  */
-static int cdr_object_format_property(struct cdr_object *cdr_obj, const char *name, char **value, size_t length)
+static int cdr_object_format_property(struct cdr_object *cdr_obj, const char *name, char *value, size_t length)
 {
 	struct ast_channel_snapshot *party_a = cdr_obj->party_a.snapshot;
 	struct ast_channel_snapshot *party_b = cdr_obj->party_b.snapshot;
 
 	if (!strcasecmp(name, "clid")) {
-		ast_callerid_merge(*value, length, party_a->caller_name, party_a->caller_number, "");
+		ast_callerid_merge(value, length, party_a->caller_name, party_a->caller_number, "");
 	} else if (!strcasecmp(name, "src")) {
-		ast_copy_string(*value, party_a->caller_number, length);
+		ast_copy_string(value, party_a->caller_number, length);
 	} else if (!strcasecmp(name, "dst")) {
-		ast_copy_string(*value, party_a->exten, length);
+		ast_copy_string(value, party_a->exten, length);
 	} else if (!strcasecmp(name, "dcontext")) {
-		ast_copy_string(*value, party_a->context, length);
+		ast_copy_string(value, party_a->context, length);
 	} else if (!strcasecmp(name, "channel")) {
-		ast_copy_string(*value, party_a->name, length);
+		ast_copy_string(value, party_a->name, length);
 	} else if (!strcasecmp(name, "dstchannel")) {
 		if (party_b) {
-			ast_copy_string(*value, party_b->name, length);
+			ast_copy_string(value, party_b->name, length);
 		} else {
-			ast_copy_string(*value, "", length);
+			ast_copy_string(value, "", length);
 		}
 	} else if (!strcasecmp(name, "lastapp")) {
-		ast_copy_string(*value, party_a->appl, length);
+		ast_copy_string(value, party_a->appl, length);
 	} else if (!strcasecmp(name, "lastdata")) {
-		ast_copy_string(*value, party_a->data, length);
+		ast_copy_string(value, party_a->data, length);
 	} else if (!strcasecmp(name, "start")) {
-		cdr_get_tv(cdr_obj->start, NULL, *value, length);
+		cdr_get_tv(cdr_obj->start, NULL, value, length);
 	} else if (!strcasecmp(name, "answer")) {
-		cdr_get_tv(cdr_obj->answer, NULL, *value, length);
+		cdr_get_tv(cdr_obj->answer, NULL, value, length);
 	} else if (!strcasecmp(name, "end")) {
-		cdr_get_tv(cdr_obj->end, NULL, *value, length);
+		cdr_get_tv(cdr_obj->end, NULL, value, length);
 	} else if (!strcasecmp(name, "duration")) {
-		snprintf(*value, length, "%ld", cdr_object_get_duration(cdr_obj));
+		snprintf(value, length, "%ld", cdr_object_get_duration(cdr_obj));
 	} else if (!strcasecmp(name, "billsec")) {
-		snprintf(*value, length, "%ld", cdr_object_get_billsec(cdr_obj));
+		snprintf(value, length, "%ld", cdr_object_get_billsec(cdr_obj));
 	} else if (!strcasecmp(name, "disposition")) {
-		snprintf(*value, length, "%d", cdr_obj->disposition);
+		snprintf(value, length, "%d", cdr_obj->disposition);
 	} else if (!strcasecmp(name, "amaflags")) {
-		snprintf(*value, length, "%d", party_a->amaflags);
+		snprintf(value, length, "%d", party_a->amaflags);
 	} else if (!strcasecmp(name, "accountcode")) {
-		ast_copy_string(*value, party_a->accountcode, length);
+		ast_copy_string(value, party_a->accountcode, length);
 	} else if (!strcasecmp(name, "peeraccount")) {
 		if (party_b) {
-			ast_copy_string(*value, party_b->accountcode, length);
+			ast_copy_string(value, party_b->accountcode, length);
 		} else {
-			ast_copy_string(*value, "", length);
+			ast_copy_string(value, "", length);
 		}
 	} else if (!strcasecmp(name, "uniqueid")) {
-		ast_copy_string(*value, party_a->uniqueid, length);
+		ast_copy_string(value, party_a->uniqueid, length);
 	} else if (!strcasecmp(name, "linkedid")) {
-		ast_copy_string(*value, cdr_obj->linkedid, length);
+		ast_copy_string(value, cdr_obj->linkedid, length);
 	} else if (!strcasecmp(name, "userfield")) {
-		ast_copy_string(*value, cdr_obj->party_a.userfield, length);
+		ast_copy_string(value, cdr_obj->party_a.userfield, length);
 	} else if (!strcasecmp(name, "sequence")) {
-		snprintf(*value, length, "%d", cdr_obj->sequence);
+		snprintf(value, length, "%d", cdr_obj->sequence);
 	} else {
 		return 1;
 	}
@@ -2629,7 +2628,7 @@
 	return 0;
 }
 
-int ast_cdr_getvar(const char *channel_name, const char *name, char **value, size_t length)
+int ast_cdr_getvar(const char *channel_name, const char *name, char *value, size_t length)
 {
 	RAII_VAR(struct cdr_object *, cdr,
 		ao2_find(active_cdrs_by_channel, channel_name, OBJ_KEY),

Modified: team/mjordan/cdrs-of-doom/res/res_stasis.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/cdrs-of-doom/res/res_stasis.c?view=diff&rev=388691&r1=388690&r2=388691
==============================================================================
--- team/mjordan/cdrs-of-doom/res/res_stasis.c (original)
+++ team/mjordan/cdrs-of-doom/res/res_stasis.c Tue May 14 11:19:36 2013
@@ -24,6 +24,7 @@
  */
 
 /*** MODULEINFO
+	<depend>res_stasis_json_events</depend>
 	<support_level>core</support_level>
  ***/
 

Modified: team/mjordan/cdrs-of-doom/tests/test_cdr.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/cdrs-of-doom/tests/test_cdr.c?view=diff&rev=388691&r1=388690&r2=388691
==============================================================================
--- team/mjordan/cdrs-of-doom/tests/test_cdr.c (original)
+++ team/mjordan/cdrs-of-doom/tests/test_cdr.c Tue May 14 11:19:36 2013
@@ -1904,7 +1904,8 @@
 	RAII_VAR(struct ast_channel *, chan, NULL, safe_channel_release);
 	RAII_VAR(struct ast_cdr_config *, config, ao2_alloc(sizeof(*config), NULL),
 			ao2_cleanup);
-	RAII_VAR(char *, varbuffer, ast_malloc(128), ast_free);
+	char varbuffer[128];
+	/*RAII_VAR(char *, varbuffer, ast_malloc(128), ast_free);*/
 	int int_buffer;
 	double db_buffer;
 	struct timespec to_sleep = {2, 0};
@@ -2017,54 +2018,54 @@
 	ast_test_validate(test, ast_cdr_setvar(ast_channel_name(chan), "sequence", "junk") != 0);
 
 	/* Verify the values */
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "userfield", &varbuffer, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "userfield", varbuffer, 128) == 0);
 	ast_test_validate(test, strcmp(varbuffer, "foobar") == 0);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "test_variable", &varbuffer, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "test_variable", varbuffer, 128) == 0);
 	ast_test_validate(test, strcmp(varbuffer, "record_1") == 0);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "amaflags", &varbuffer, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "amaflags", varbuffer, 128) == 0);
 	sscanf(varbuffer, "%d", &int_buffer);
 	ast_test_validate(test, int_buffer == AST_AMA_OMIT);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "accountcode", &varbuffer, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "accountcode", varbuffer, 128) == 0);
 	ast_test_validate(test, strcmp(varbuffer, "XXX") == 0);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "clid", &varbuffer, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "clid", varbuffer, 128) == 0);
 	ast_test_validate(test, strcmp(varbuffer, "\"Alice\" <100>") == 0);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "src", &varbuffer, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "src", varbuffer, 128) == 0);
 	ast_test_validate(test, strcmp(varbuffer, "100") == 0);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "dst", &varbuffer, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "dst", varbuffer, 128) == 0);
 	ast_test_validate(test, strcmp(varbuffer, "100") == 0);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "dcontext", &varbuffer, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "dcontext", varbuffer, 128) == 0);
 	ast_test_validate(test, strcmp(varbuffer, "default") == 0);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "channel", &varbuffer, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "channel", varbuffer, 128) == 0);
 	ast_test_validate(test, strcmp(varbuffer, CHANNEL_TECH_NAME "/Alice") == 0);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "dstchannel", &varbuffer, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "dstchannel", varbuffer, 128) == 0);
 	ast_test_validate(test, strcmp(varbuffer, "") == 0);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "lastapp", &varbuffer, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "lastapp", varbuffer, 128) == 0);
 	ast_test_validate(test, strcmp(varbuffer, "Wait") == 0);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "lastdata", &varbuffer, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "lastdata", varbuffer, 128) == 0);
 	ast_test_validate(test, strcmp(varbuffer, "10") == 0);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "start", &varbuffer, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "start", varbuffer, 128) == 0);
 	sscanf(varbuffer, "%lf", &db_buffer);
 	ast_test_validate(test, fabs(db_buffer) > 0);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "answer", &varbuffer, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "answer", varbuffer, 128) == 0);
 	sscanf(varbuffer, "%lf", &db_buffer);
 	ast_test_validate(test, fabs(db_buffer) < EPSILON);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "end", &varbuffer, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "end", varbuffer, 128) == 0);
 	sscanf(varbuffer, "%lf", &db_buffer);
 	ast_test_validate(test, fabs(db_buffer) < EPSILON);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "duration", &varbuffer, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "duration", varbuffer, 128) == 0);
 	sscanf(varbuffer, "%lf", &db_buffer);
 	ast_test_validate(test, fabs(db_buffer) > 0);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "billsec", &varbuffer, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "billsec", varbuffer, 128) == 0);
 	sscanf(varbuffer, "%lf", &db_buffer);
 	ast_test_validate(test, fabs(db_buffer) < EPSILON);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "disposition", &varbuffer, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "disposition", varbuffer, 128) == 0);
 	sscanf(varbuffer, "%d", &int_buffer);
 	ast_test_validate(test, int_buffer == AST_CDR_NULL);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "uniqueid", &varbuffer, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "uniqueid", varbuffer, 128) == 0);
 	ast_test_validate(test, strcmp(varbuffer, ast_channel_uniqueid(chan)) == 0);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "linkedid", &varbuffer, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "linkedid", varbuffer, 128) == 0);
 	ast_test_validate(test, strcmp(varbuffer, ast_channel_linkedid(chan)) == 0);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "sequence", &varbuffer, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "sequence", varbuffer, 128) == 0);
 
 	/* Fork the CDR, and check that we change the properties on both CDRs. */
 	ast_set_flag(&fork_options, AST_CDR_FLAG_KEEP_VARS);
@@ -2176,12 +2177,18 @@
 	RAII_VAR(struct ast_channel *, chan, NULL, safe_channel_release);
 	RAII_VAR(struct ast_cdr_config *, config, ao2_alloc(sizeof(*config), NULL),
 			ao2_cleanup);
-	RAII_VAR(char *, varbuffer, ast_malloc(128), ast_free);
+	char varbuffer[128];
+	char fork_varbuffer[128];
+	char answer_time[128];
+	char fork_answer_time[128];
+	char start_time[128];
+	char fork_start_time[128];
+	/*RAII_VAR(char *, varbuffer, ast_malloc(128), ast_free);
 	RAII_VAR(char *, fork_varbuffer, ast_malloc(128), ast_free);
 	RAII_VAR(char *, answer_time, ast_malloc(128), ast_free);
 	RAII_VAR(char *, fork_answer_time, ast_malloc(128), ast_free);
 	RAII_VAR(char *, start_time, ast_malloc(128), ast_free);
-	RAII_VAR(char *, fork_start_time, ast_malloc(128), ast_free);
+	RAII_VAR(char *, fork_start_time, ast_malloc(128), ast_free);*/
 	struct ast_flags fork_options = { 0, };
 	struct timespec to_sleep = {1, 10000};
 
@@ -2245,12 +2252,12 @@
 
 	/* Test blowing away variables */
 	ast_test_validate(test, ast_cdr_setvar(ast_channel_name(chan), "test_variable", "record_1") == 0);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "test_variable", &varbuffer, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "test_variable", varbuffer, 128) == 0);
 	ast_test_validate(test, strcmp(varbuffer, "record_1") == 0);
 	ast_copy_string(varbuffer, "", 128);
 
 	ast_test_validate(test, ast_cdr_fork(ast_channel_name(chan), &fork_options) == 0);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "test_variable", &fork_varbuffer, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "test_variable", fork_varbuffer, 128) == 0);
 	ast_test_validate(test, strcmp(varbuffer, "record_1") != 0);
 
 	/* Test finalizing previous CDRs */
@@ -2261,18 +2268,18 @@
 	ast_setstate(chan, AST_STATE_UP);
 	while ((nanosleep(&to_sleep, &to_sleep) == -1) && (errno == EINTR));
 	ast_test_validate(test, ast_cdr_setvar(ast_channel_name(chan), "test_variable", "record_2") == 0);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "test_variable", &varbuffer, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "test_variable", varbuffer, 128) == 0);
 	ast_test_validate(test, strcmp(varbuffer, "record_2") == 0);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "answer", &answer_time, 128) == 0);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "start", &start_time, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "answer", answer_time, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "start", start_time, 128) == 0);
 
 	ast_set_flag(&fork_options, AST_CDR_FLAG_FINALIZE);
 	ast_set_flag(&fork_options, AST_CDR_FLAG_KEEP_VARS);
 	ast_set_flag(&fork_options, AST_CDR_FLAG_SET_ANSWER);
 	ast_test_validate(test, ast_cdr_fork(ast_channel_name(chan), &fork_options) == 0);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "answer", &fork_answer_time, 128) == 0);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "start", &fork_start_time, 128) == 0);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "test_variable", &fork_varbuffer, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "answer", fork_answer_time, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "start", fork_start_time, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "test_variable", fork_varbuffer, 128) == 0);
 	ast_test_validate(test, strcmp(fork_varbuffer, varbuffer) == 0);
 	ast_test_validate(test, strcmp(fork_start_time, start_time) == 0);
 	ast_test_validate(test, strcmp(fork_answer_time, answer_time) != 0);
@@ -2280,8 +2287,8 @@
 	ast_clear_flag(&fork_options, AST_CDR_FLAG_SET_ANSWER);
 	ast_set_flag(&fork_options, AST_CDR_FLAG_RESET);
 	ast_test_validate(test, ast_cdr_fork(ast_channel_name(chan), &fork_options) == 0);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "answer", &fork_answer_time, 128) == 0);
-	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "start", &fork_start_time, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "answer", fork_answer_time, 128) == 0);
+	ast_test_validate(test, ast_cdr_getvar(ast_channel_name(chan), "start", fork_start_time, 128) == 0);
 	ast_test_validate(test, strcmp(fork_start_time, start_time) != 0);
 	ast_test_validate(test, strcmp(fork_answer_time, answer_time) != 0);
 




More information about the asterisk-commits mailing list