Changeset 340:81821e9f6988 in freeDiameter for libfreeDiameter/sessions.c
- Timestamp:
- Jun 28, 2010, 11:20:48 AM (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfreeDiameter/sessions.c
r293 r340 69 69 int eyec; /* An eye catcher also used to ensure the object is valid, must be SH_EYEC */ 70 70 int id; /* A unique integer to identify this handler */ 71 void (*cleanup)( char *, session_state*); /* The cleanup function to be called for cleaning a state */71 void (*cleanup)(session_state *, char *); /* The cleanup function to be called for cleaning a state */ 72 72 }; 73 73 … … 247 247 248 248 /* Create a new handler */ 249 int fd_sess_handler_create_internal ( struct session_handler ** handler, void (*cleanup)( char * sid, session_state * state) )249 int fd_sess_handler_create_internal ( struct session_handler ** handler, void (*cleanup)(session_state * state, char * sid) ) 250 250 { 251 251 struct session_handler *new; … … 318 318 struct state * st = (struct state *)(deleted_states.next->o); 319 319 TRACE_DEBUG(FULL, "Calling cleanup handler for session '%s' and data %p", st->sid, st->state); 320 (*del->cleanup)(st->s id, st->state);320 (*del->cleanup)(st->state, st->sid); 321 321 free(st->sid); 322 322 fd_list_unlink(&st->chain); … … 576 576 fd_list_unlink(&st->chain); 577 577 TRACE_DEBUG(FULL, "Calling handler %p cleanup for state registered with session '%s'", st->hdl, sess->sid); 578 (*st->hdl->cleanup)(s ess->sid, st->state);578 (*st->hdl->cleanup)(st->state, sess->sid); 579 579 free(st); 580 580 }
Note: See TracChangeset
for help on using the changeset viewer.