Changeset 1088:1d1a20a0779d in freeDiameter for extensions
- Timestamp:
- May 5, 2013, 4:25:27 AM (11 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- extensions
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/_sample/sample.c
r974 r1088 85 85 CHECK_FCT( fd_dict_new ( fd_g_config->cnf_dict, DICT_RULE, &rule_data, example_avp_avp, NULL )); 86 86 87 fd_dict_dump_object(example_avp_avp);88 87 } 89 88 TRACE_DEBUG(INFO, "'Example-AVP' created without error"); -
extensions/app_diameap/diameap_server.c
r1027 r1088 85 85 86 86 87 void diameap_cli_sess_cleanup(void * arg, char * sid, void * opaque) 88 { 89 90 struct diameap_sess_data_sm * diameap_sess_data = 91 (struct diameap_sess_data_sm *) arg; 87 void diameap_cli_sess_cleanup(struct sess_state * diameap_sess_data, os0_t sid, void * opaque) 88 { 89 92 90 CHECK_PARAMS_DO( diameap_sess_data, return ); 93 91 … … 141 139 static int diameap_initialize_diameap_sm( 142 140 struct diameap_state_machine * diameap_sm, 143 struct diameap_sess_data_sm* diameap_sess_data)141 struct sess_state * diameap_sess_data) 144 142 { 145 143 TRACE_ENTRY("%p %p", diameap_sm, diameap_sess_data); … … 1017 1015 1018 1016 static int diameap_sess_data_new( 1019 struct diameap_sess_data_sm*diameap_sess_data,1017 struct sess_state *diameap_sess_data, 1020 1018 struct diameap_state_machine *diameap_sm) 1021 1019 { … … 3064 3062 TRACE_ENTRY("%p %p %p %p", rmsg, ravp, sess, action); 3065 3063 3066 struct diameap_sess_data_sm* diameap_sess_data = NULL;3064 struct sess_state * diameap_sess_data = NULL; 3067 3065 struct diameap_state_machine * diameap_sm = NULL; 3068 3066 struct diameap_eap_interface eap_i; … … 3258 3256 TRACE_DEBUG(FULL+1,"%sStoring DiamEAP session data.",DIAMEAP_EXTENSION) 3259 3257 ; 3260 CHECK_MALLOC(diameap_sess_data = malloc(sizeof(struct diameap_sess_data_sm)))3261 ; 3262 memset(diameap_sess_data, 0, sizeof(struct diameap_sess_data_sm));3258 CHECK_MALLOC(diameap_sess_data = malloc(sizeof(struct sess_state))) 3259 ; 3260 memset(diameap_sess_data, 0, sizeof(struct sess_state)); 3263 3261 diameap_sess_data_new(diameap_sess_data, diameap_sm); 3264 3262 … … 3389 3387 3390 3388 /*create handler for sessions */ 3391 CHECK_FCT(fd_sess_handler_create(&diameap_server_reg, diameap_cli_sess_cleanup, NULL ));3389 CHECK_FCT(fd_sess_handler_create(&diameap_server_reg, diameap_cli_sess_cleanup, NULL, NULL)); 3392 3390 3393 3391 /* Register the callback */ -
extensions/app_diameap/diameap_server.h
r441 r1088 40 40 #define DIAMEAP_SERVER_H_ 41 41 42 42 43 43 /* session data structure to store */ 44 struct diameap_sess_data_sm44 struct sess_state 45 45 { 46 46 int invalid_eappackets; /* Number of invalid EAP Packet received*/ -
extensions/app_radgw/rgwx_acct.c
r1027 r1088 160 160 }; 161 161 162 static DECLARE_FD_DUMP_PROTOTYPE(acct_conf_session_state_dump, struct sess_state * st) 163 { 164 return fd_dump_extend( FD_DUMP_STD_PARAMS, "[rgwx sess_state](@%p): aai:%x str:%d TC:%u", st, st->auth_appl, st->send_str, st->term_cause); 165 } 166 162 167 /* Initialize the plugin */ 163 168 static int acct_conf_parse(char * conffile, struct rgwp_config ** state) … … 172 177 memset(new, 0, sizeof(struct rgwp_config)); 173 178 174 CHECK_FCT( fd_sess_handler_create( &new->sess_hdl, free, NULL ) );179 CHECK_FCT( fd_sess_handler_create( &new->sess_hdl, (void *)free, acct_conf_session_state_dump, NULL ) ); 175 180 new->confstr = conffile; 176 181 -
extensions/app_radgw/rgwx_auth.c
r1027 r1088 125 125 }; 126 126 127 struct sess_state { 128 char req_auth[16]; 129 }; 130 131 127 132 /* Initialize the plugin */ 128 133 static int auth_conf_parse(char * confstr, struct rgwp_config ** state) … … 137 142 memset(new, 0, sizeof(struct rgwp_config)); 138 143 139 CHECK_FCT( fd_sess_handler_create( &new->sess_hdl, free, NULL ) );144 CHECK_FCT( fd_sess_handler_create( &new->sess_hdl, (void *)free, NULL, NULL ) ); 140 145 new->confstr = confstr; 141 146 … … 1057 1062 /* Store the request identifier in the session (if provided) */ 1058 1063 { 1059 unsigned char * req_auth;1060 CHECK_MALLOC( req_auth = malloc(16));1061 memcpy( req_auth, &rad_req->hdr->authenticator[0], 16);1064 struct sess_state *st; 1065 CHECK_MALLOC(st = malloc(sizeof(struct sess_state))); 1066 memcpy(st->req_auth, &rad_req->hdr->authenticator[0], 16); 1062 1067 1063 CHECK_FCT( fd_sess_state_store( cs->sess_hdl, sess, & req_auth) );1068 CHECK_FCT( fd_sess_state_store( cs->sess_hdl, sess, &st ) ); 1064 1069 } 1065 1070 … … 1077 1082 int no_str = 0; /* indicate if an STR is required for this server */ 1078 1083 uint8_t tuntag = 0; 1079 unsigned char * req_auth = NULL;1084 struct sess_state *st; 1080 1085 int error_cause = 0; 1081 1086 struct session * sess; … … 1089 1094 CHECK_FCT( fd_msg_sess_get(fd_g_config->cnf_dict, *diam_ans, &sess, NULL) ); 1090 1095 if (sess) { 1091 CHECK_FCT( fd_sess_state_retrieve( cs->sess_hdl, sess, & req_auth) );1096 CHECK_FCT( fd_sess_state_retrieve( cs->sess_hdl, sess, &st ) ); 1092 1097 CHECK_FCT( fd_sess_getsid(sess, &sid, &sidlen) ); 1093 1098 } /* else ? */ … … 1759 1764 1760 1765 /* We need the request authenticator */ 1761 CHECK_PARAMS( req_auth);1766 CHECK_PARAMS(st); 1762 1767 1763 1768 /* Retrieve the shared secret */ … … 1778 1783 addr[0] = secret; 1779 1784 len[0] = secret_len; 1780 addr[1] = req_auth;1785 addr[1] = st->req_auth; 1781 1786 len[1] = 16; 1782 1787 addr[2] = &buf[1]; … … 1853 1858 1854 1859 /* We need the request authenticator */ 1855 CHECK_PARAMS( req_auth);1860 CHECK_PARAMS(st); 1856 1861 1857 1862 /* Retrieve the shared secret */ … … 1866 1871 send_len = ahdr->avp_value->os.len - recv_len; 1867 1872 1868 if ( ! radius_msg_add_mppe_keys(*rad_fw, req_auth, secret, secret_len,1873 if ( ! radius_msg_add_mppe_keys(*rad_fw, st->req_auth, secret, secret_len, 1869 1874 ahdr->avp_value->os.data + recv_len, send_len, 1870 1875 ahdr->avp_value->os.data, recv_len) ) { … … 1925 1930 1926 1931 CHECK_FCT( fd_msg_free( aoh ) ); 1927 free( req_auth);1932 free(st); 1928 1933 1929 1934 if (error_cause) { -
extensions/app_radgw/rgwx_echodrop.c
r996 r1088 38 38 #include "rgwx_echodrop.h" 39 39 40 struct sess_state { 41 struct fd_list sentinel; 42 }; 43 40 44 /* If a session is destroyed, empty the list of ed_saved_attribute */ 41 static void state_delete(void * arg, char * sid, void * opaque) { 42 struct fd_list * list = (struct fd_list *)arg; 43 44 CHECK_PARAMS_DO( list, return ); 45 46 while (!FD_IS_LIST_EMPTY(list)) { 47 struct ed_saved_attribute * esa = (struct ed_saved_attribute *)(list->next); 45 static void state_delete(struct sess_state * arg, os0_t sid, void * opaque) { 46 while (!FD_IS_LIST_EMPTY(&arg->sentinel)) { 47 struct ed_saved_attribute * esa = (struct ed_saved_attribute *)(arg->sentinel.next); 48 48 fd_list_unlink(&esa->chain); 49 49 free(esa); 50 50 } 51 free(list); 52 } 53 51 free(arg); 52 } 53 54 static DECLARE_FD_DUMP_PROTOTYPE(ed_session_state_dump, struct sess_state * st) 55 { 56 struct fd_list * li; 57 CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "[rgwx sess_state](@%p):\n", st), return NULL); 58 for (li = st->sentinel.next; li != &st->sentinel; li = li->next) { 59 struct ed_saved_attribute * esa = (struct ed_saved_attribute *)(li); 60 CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "[rgwx sess_state {esa}] t:%2hhx l:%2hhx d:", esa->attr.type, esa->attr.length), return NULL); 61 CHECK_MALLOC_DO( fd_dump_extend_hexdump(FD_DUMP_STD_PARAMS, (&esa->attr.length) + 1, esa->attr.length - 2, 0,0), return NULL); 62 CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "\n"), return NULL); 63 } 64 } 54 65 55 66 /* Initialize the plugin and parse the configuration. */ … … 69 80 70 81 /* Create the session handler */ 71 CHECK_FCT( fd_sess_handler_create( &new->sess_hdl, state_delete, NULL ) );82 CHECK_FCT( fd_sess_handler_create( &new->sess_hdl, state_delete, ed_session_state_dump, NULL ) ); 72 83 73 84 /* Parse the configuration file */ … … 217 228 if (!FD_IS_LIST_EMPTY(&echo_list)) { 218 229 struct session * sess; 230 struct sess_state * st; 219 231 220 232 CHECK_FCT( fd_msg_sess_get(fd_g_config->cnf_dict, *diam_fw, &sess, NULL) ); … … 229 241 230 242 /* Move the values in a dynamically allocated list */ 231 CHECK_MALLOC( li = malloc(sizeof(struct fd_list)) );232 fd_list_init( li, NULL);233 fd_list_move_end( li, &echo_list);243 CHECK_MALLOC( st = malloc(sizeof(struct sess_state)) ); 244 fd_list_init(&st->sentinel, NULL); 245 fd_list_move_end(&st->sentinel, &echo_list); 234 246 235 247 /* Save the list in the session */ 236 CHECK_FCT( fd_sess_state_store( cs->sess_hdl, sess, & li) );248 CHECK_FCT( fd_sess_state_store( cs->sess_hdl, sess, &st ) ); 237 249 } 238 250 … … 243 255 static int ed_diam_ans( struct rgwp_config * cs, struct msg ** diam_ans, struct radius_msg ** rad_fw, struct rgw_client * cli ) 244 256 { 245 struct fd_list * list = NULL;246 257 struct session * sess; 258 struct sess_state * st; 247 259 248 260 TRACE_ENTRY("%p %p %p %p", cs, diam_ans, rad_fw, cli); … … 258 270 259 271 /* Now try and retrieve any data from the session */ 260 CHECK_FCT( fd_sess_state_retrieve( cs->sess_hdl, sess, & list ) );261 if ( list == NULL) {272 CHECK_FCT( fd_sess_state_retrieve( cs->sess_hdl, sess, &st ) ); 273 if (st == NULL) { 262 274 /* No attribute saved in the session, just return */ 263 275 return 0; … … 268 280 CHECK_PARAMS( rad_fw && *rad_fw); 269 281 270 while (! FD_IS_LIST_EMPTY( list) ) {271 struct ed_saved_attribute * esa = (struct ed_saved_attribute *)( list->next);282 while (! FD_IS_LIST_EMPTY(&st->sentinel) ) { 283 struct ed_saved_attribute * esa = (struct ed_saved_attribute *)(st->sentinel.next); 272 284 273 285 fd_list_unlink(&esa->chain); … … 280 292 free(esa); 281 293 } 282 free( list);294 free(st); 283 295 284 296 return 0; -
extensions/app_radgw/rgwx_sip.c
r1027 r1088 134 134 135 135 } dict; /* cache of the dictionary objects we use */ 136 struct session_handler * sess_hdl; /* We store RADIUS request authenticator information in the session */137 136 char * confstr; 138 137 //Chained list of nonce … … 258 257 memset(new, 0, sizeof(struct rgwp_config)); 259 258 260 CHECK_FCT( fd_sess_handler_create( &new->sess_hdl, free, NULL ) );261 259 new->confstr = conffile; 262 260 … … 312 310 CHECK_PARAMS_DO( state, return ); 313 311 314 CHECK_FCT_DO( fd_sess_handler_destroy( &state->sess_hdl, NULL ), );315 316 312 nonce_deletelistnonce(state); 317 313 CHECK_POSIX_DO(pthread_mutex_destroy(&state->nonce_mutex), /*continue*/); … … 320 316 return; 321 317 } 322 323 318 324 319 /* Handle an incoming RADIUS request */ … … 717 712 //fd_msg_dump_walk(1,*diam_fw); 718 713 719 /* Store the request identifier in the session */720 {721 unsigned char * req_sip;722 CHECK_MALLOC(req_sip = malloc(16));723 memcpy(req_sip, &rad_req->hdr->authenticator[0], 16);724 725 CHECK_FCT( fd_sess_state_store( cs->sess_hdl, sess, &req_sip ) );726 }727 728 714 729 715 return 0; … … 857 843 } 858 844 859 CHECK_FCT( fd_sess_state_retrieve( cs->sess_hdl, sess, &req_sip ) );860 free(req_sip);861 862 845 return 0; 863 846 } -
extensions/app_sip/app_sip.c
r1027 r1088 50 50 51 51 struct disp_hdl * app_sip_default_hdl=NULL; 52 struct session_handler * ds_sess_hdl;53 52 54 53 //configuration stucture … … 213 212 return EINVAL; 214 213 215 CHECK_FCT(fd_sess_handler_create(&ds_sess_hdl, free, NULL));216 217 214 //Creation of thread for Registration Termination 218 215 if(pthread_create(&rtr_thread, NULL,rtr_socket, NULL)) … … 238 235 239 236 (void) fd_disp_unregister(&app_sip_MAR_hdl, NULL); 240 CHECK_FCT_DO( fd_sess_handler_destroy(&ds_sess_hdl, NULL),return);241 237 242 238 -
extensions/app_sip/app_sip.h
r1034 r1088 212 212 #define CODE_SIP_USER_DATA_TYPE 388 213 213 #define CODE_SIP_AOR 122 214 215 struct ds_nonce216 {217 char *nonce;218 };219 214 220 215 //Storage for some useful AVPs -
extensions/app_sip/multimediaauth.c
r639 r1088 36 36 #include "app_sip.h" 37 37 38 struct sess_state 39 { 40 char *nonce; 41 }; 42 38 43 39 44 int app_sip_MAR_cb( struct msg ** msg, struct avp * paramavp, struct session * sess, void * opaque, enum disp_action * act) … … 56 61 57 62 //The nonce we will store and retrieve in session 58 struct ds_nonce *storednonce=NULL;63 struct sess_state *storednonce=NULL; 59 64 60 65 … … 362 367 363 368 //We store the nonce (storednonce structure) inside the session 364 storednonce=malloc(sizeof(struct ds_nonce));365 memset(storednonce,0,sizeof(struct ds_nonce));369 storednonce=malloc(sizeof(struct sess_state)); 370 memset(storednonce,0,sizeof(struct sess_state)); 366 371 CHECK_MALLOC(storednonce->nonce=malloc(NONCE_SIZE*2+1)); 367 372 memcpy(storednonce->nonce,(char *)nonce,NONCE_SIZE*2+1); -
extensions/dbg_interactive/dictionary.i
r979 r1088 60 60 } 61 61 void dump() { 62 fd_dict_dump($self); 62 char * buf = NULL; 63 size_t len; 64 printf("%s", fd_dict_dump(&buf, &len, NULL, $self)); 65 free(buf); 63 66 } 64 67 PyObject * vendors_list() { … … 128 131 %extend dict_object { 129 132 void dump() { 130 fd_dict_dump_object($self); 133 char * buf = NULL; 134 size_t len; 135 printf("%s", fd_dict_dump_object(&buf, &len, NULL, $self)); 136 free(buf); 131 137 } 132 138 enum dict_object_type gettype() { -
extensions/dbg_interactive/endpoints.i
r978 r1088 126 126 127 127 void dump() { 128 fd_ep_dump_one( "", $self ); 128 char * buf = NULL; 129 size_t len; 130 printf("%s", fd_ep_dump_one(&buf, &len, NULL, $self)); 131 free(buf); 129 132 } 130 133 } -
extensions/dbg_interactive/messages.i
r1078 r1088 291 291 /* Dump */ 292 292 void dump (int tree = 1) { 293 if (tree)294 fd_msg_dump_walk(0, $self);295 else296 fd_msg_dump_one(0, $self);293 char * buf = NULL; 294 size_t len; 295 printf("%s", fd_msg_dump_treeview(&buf, &len, NULL, $self, NULL, 0, tree)); 296 free(buf); 297 297 } 298 298 … … 570 570 /* Dump */ 571 571 void dump (int tree = 1) { 572 if (tree)573 fd_msg_dump_walk(0, $self);574 else575 fd_msg_dump_one(0, $self);572 char * buf = NULL; 573 size_t len; 574 printf("%s", fd_msg_dump_treeview(&buf, &len, NULL, $self, NULL, 0, tree)); 575 free(buf); 576 576 } 577 577 -
extensions/dbg_interactive/sessions.i
r1013 r1088 39 39 40 40 %{ 41 struct sess_state { 42 PyObject * pystate; 43 }; 44 41 45 /* call it (might be called from a different thread than the interpreter, when session times out) */ 42 static void call_the_python_cleanup_callback(s ession_state * state, os0_t sid, void * cb) {46 static void call_the_python_cleanup_callback(struct sess_state * state, os0_t sid, void * cb) { 43 47 PyObject *result; 44 48 if (!cb) { … … 67 71 Py_XINCREF(PyCb); 68 72 69 ret = fd_sess_handler_create _internal ( &hdl, call_the_python_cleanup_callback, PyCb );73 ret = fd_sess_handler_create ( &hdl, call_the_python_cleanup_callback, NULL, PyCb ); 70 74 if (ret != 0) { 71 75 DI_ERROR(ret, NULL, NULL); … … 87 91 } 88 92 void dump() { 89 fd_sess_dump_hdl(0, $self); 93 char * buf = NULL; 94 size_t len; 95 printf("%s", fd_sess_dump_hdl(&buf, &len, NULL, $self)); 96 free(buf); 90 97 } 91 98 } … … 166 173 } 167 174 void dump() { 168 fd_sess_dump(0, $self); 175 char * buf = NULL; 176 size_t len = 0; 177 printf("%s", fd_sess_dump(&buf, &len, NULL, $self, 1) ); 178 free(buf); 169 179 } 170 180 void store(struct session_handler * handler, PyObject * DISOWN) { 171 181 int ret; 172 void * store = DISOWN; 182 struct sess_state * st = NULL; 183 st = malloc(sizeof(struct sess_state)); 184 st->pystate = DISOWN; 173 185 Py_XINCREF(DISOWN); 174 ret = fd_sess_state_store _internal(handler, $self, (void *) &store);186 ret = fd_sess_state_store(handler, $self, (void *) &st); 175 187 if (ret != 0) { 176 188 DI_ERROR(ret, NULL, NULL); … … 180 192 PyObject * retrieve(struct session_handler * handler) { 181 193 int ret; 194 struct sess_state * st = NULL; 182 195 PyObject * state = NULL; 183 ret = fd_sess_state_retrieve_internal(handler, $self, (void *) &st ate);184 if (ret != 0) { 185 DI_ERROR(ret, NULL, NULL); 186 return NULL; 187 } 188 if (st ate== NULL) {196 ret = fd_sess_state_retrieve_internal(handler, $self, (void *) &st); 197 if (ret != 0) { 198 DI_ERROR(ret, NULL, NULL); 199 return NULL; 200 } 201 if (st == NULL) { 189 202 Py_INCREF(Py_None); 190 203 return Py_None; 191 204 } 205 state = st->pystate; 206 free(st); 192 207 return state; 193 208 } -
extensions/dbg_monitor/dbg_monitor.c
r1083 r1088 78 78 int i = 0; 79 79 fd_log_threadname("Monitor thread"); 80 char * buf = NULL; 81 size_t len; 80 82 81 83 /* Loop */ … … 111 113 struct peer_hdr * p = (struct peer_hdr *)li->o; 112 114 113 fd_peer_dump(p, NONE);115 TRACE_DEBUG(INFO, "%s", fd_peer_dump(&buf, &len, NULL, p, 1)); 114 116 115 117 CHECK_FCT_DO( fd_stat_getstats(STAT_P_PSM, p, ¤t_count, &limit_count, &highest_count, &total_count, &total, &blocking, &last), ); … … 123 125 CHECK_FCT_DO( pthread_rwlock_unlock(&fd_g_peers_rw), /* continue */ ); 124 126 125 CHECK_FCT_DO(fd_event_send(fd_g_config->cnf_main_ev, FDEV_DUMP_SERV, 0, NULL), /* continue */); 127 TRACE_DEBUG(INFO, "[dbg_monitor] Dumping servers information"); 128 TRACE_DEBUG(INFO, "%s", fd_servers_dump(&buf, &len, NULL)); 129 126 130 sleep(1); 127 131 } 128 132 133 free(buf); 129 134 return NULL; 130 135 } … … 133 138 static void got_sig() 134 139 { 135 fd_log_debug("[dbg_monitor] Dumping extra information"); 136 CHECK_FCT_DO(fd_event_send(fd_g_config->cnf_main_ev, FDEV_DUMP_DICT, 0, NULL), /* continue */); 137 CHECK_FCT_DO(fd_event_send(fd_g_config->cnf_main_ev, FDEV_DUMP_CONFIG, 0, NULL), /* continue */); 138 CHECK_FCT_DO(fd_event_send(fd_g_config->cnf_main_ev, FDEV_DUMP_EXT, 0, NULL), /* continue */); 140 char * buf = NULL; 141 size_t len; 142 TRACE_DEBUG(INFO, "[dbg_monitor] Dumping config information"); 143 TRACE_DEBUG(INFO, "%s", fd_conf_dump(&buf, &len, NULL)); 144 TRACE_DEBUG(INFO, "[dbg_monitor] Dumping extensions information"); 145 TRACE_DEBUG(INFO, "%s", fd_ext_dump(&buf, &len, NULL)); 146 TRACE_DEBUG(INFO, "[dbg_monitor] Dumping dictionary information"); 147 TRACE_DEBUG(INFO, "%s", fd_dict_dump(&buf, &len, NULL, fd_g_config->cnf_dict)); 148 free(buf); 139 149 } 140 150 -
extensions/dict_legacy_xml/dict_lxml_xml.c
r974 r1088 1809 1809 1810 1810 TRACE_DEBUG(FULL, "Conversion from '%s' to freeDiameter internal format complete.", xmlfilename); 1811 if (TRACE_BOOL(ANNOYING)) {1812 fd_dict_dump(fd_g_config->cnf_dict);1813 }1814 1811 1815 1812 /* Done */ -
extensions/test_app/ta_cli.c
r930 r1088 46 46 static struct session_handler * ta_cli_reg = NULL; 47 47 48 struct ta_mess_info{48 struct sess_state { 49 49 int32_t randval; /* a random value to store in Test-AVP */ 50 50 struct timespec ts; /* Time of sending the message */ … … 54 54 static void ta_cb_ans(void * data, struct msg ** msg) 55 55 { 56 struct ta_mess_info* mi = NULL;56 struct sess_state * mi = NULL; 57 57 struct timespec ts; 58 58 struct session * sess; … … 177 177 struct avp * avp; 178 178 union avp_value val; 179 struct ta_mess_info* mi = NULL, *svg;179 struct sess_state * mi = NULL, *svg; 180 180 struct session *sess = NULL; 181 181 … … 191 191 192 192 /* Create the random value to store with the session */ 193 mi = malloc(sizeof(struct ta_mess_info));193 mi = malloc(sizeof(struct sess_state)); 194 194 if (mi == NULL) { 195 195 fd_log_debug("malloc failed: %s", strerror(errno)); … … 265 265 int ta_cli_init(void) 266 266 { 267 CHECK_FCT( fd_sess_handler_create(&ta_cli_reg, free, NULL) );267 CHECK_FCT( fd_sess_handler_create(&ta_cli_reg, (void *)free, NULL, NULL) ); 268 268 269 269 CHECK_FCT( fd_event_trig_regcb(ta_conf->signal, "test_app.cli", ta_cli_test_message ) ); -
extensions/test_sip/test_sip.c
r972 r1088 54 54 55 55 struct disp_hdl * test_sip_default_hdl=NULL; 56 struct session_handler * ts_sess_hdl;57 56 58 57 //configuration stucture … … 214 213 */ 215 214 216 CHECK_FCT(fd_sess_handler_create(&ts_sess_hdl, free, NULL));217 215 //CHECK_FCT( fd_event_trig_regcb(30, "test_sip", (void *)test_sipSL_LIR_cb ) ); 218 216 CHECK_FCT( fd_event_trig_regcb(30, "test_sip", (void *)test_sip_SAR_cb ) );
Note: See TracChangeset
for help on using the changeset viewer.