diff extensions/test_app/ta_cli.c @ 1088:1d1a20a0779d

Second part of changeset 1083, now the code compiles again. Still missing some functions implementation, though
author Sebastien Decugis <sdecugis@freediameter.net>
date Sat, 04 May 2013 21:25:27 +0200
parents 64d8ba7976d0
children c2fbaf2985f4
line wrap: on
line diff
--- a/extensions/test_app/ta_cli.c	Sat May 04 17:00:39 2013 +0200
+++ b/extensions/test_app/ta_cli.c	Sat May 04 21:25:27 2013 +0200
@@ -45,7 +45,7 @@
 
 static struct session_handler * ta_cli_reg = NULL;
 
-struct ta_mess_info {
+struct sess_state {
 	int32_t		randval;	/* a random value to store in Test-AVP */
 	struct timespec ts;		/* Time of sending the message */
 } ;
@@ -53,7 +53,7 @@
 /* Cb called when an answer is received */
 static void ta_cb_ans(void * data, struct msg ** msg)
 {
-	struct ta_mess_info * mi = NULL;
+	struct sess_state * mi = NULL;
 	struct timespec ts;
 	struct session * sess;
 	struct avp * avp;
@@ -176,7 +176,7 @@
 	struct msg * req = NULL;
 	struct avp * avp;
 	union avp_value val;
-	struct ta_mess_info * mi = NULL, *svg;
+	struct sess_state * mi = NULL, *svg;
 	struct session *sess = NULL;
 	
 	TRACE_DEBUG(FULL, "Creating a new message for sending.");
@@ -190,7 +190,7 @@
 	CHECK_FCT_DO( fd_msg_sess_get(fd_g_config->cnf_dict, req, &sess, NULL), goto out );
 	
 	/* Create the random value to store with the session */
-	mi = malloc(sizeof(struct ta_mess_info));
+	mi = malloc(sizeof(struct sess_state));
 	if (mi == NULL) {
 		fd_log_debug("malloc failed: %s", strerror(errno));
 		goto out;
@@ -264,7 +264,7 @@
 
 int ta_cli_init(void)
 {
-	CHECK_FCT( fd_sess_handler_create(&ta_cli_reg, free, NULL) );
+	CHECK_FCT( fd_sess_handler_create(&ta_cli_reg, (void *)free, NULL, NULL) );
 	
 	CHECK_FCT( fd_event_trig_regcb(ta_conf->signal, "test_app.cli", ta_cli_test_message ) );
 	
"Welcome to our mercurial repository"