Changeset 120:d7acdc46134d in freeDiameter for extensions/dbg_rt
- Timestamp:
- Dec 9, 2009, 5:36:38 PM (14 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- extensions/dbg_rt
- Files:
-
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
extensions/dbg_rt/CMakeLists.txt
r117 r120 3 3 4 4 # Compile as a module 5 FD_ADD_EXTENSION( rt_debug rt_debug.c)5 FD_ADD_EXTENSION(dbg_rt dbg_rt.c) -
extensions/dbg_rt/dbg_rt.c
r117 r120 44 44 45 45 /* Proxying debug callback */ 46 static int rtdebug_fwd_cb(void * cbdata, struct msg ** msg)46 static int dbgrt_fwd_cb(void * cbdata, struct msg ** msg) 47 47 { 48 48 TRACE_ENTRY("%p %p", cbdata, msg); 49 49 50 fd_log_debug("[ rt_debug] FWD routing message: %p\n", msg ? *msg : NULL);50 fd_log_debug("[dbg_rt] FWD routing message: %p\n", msg ? *msg : NULL); 51 51 if (msg) 52 52 fd_msg_dump_walk(INFO, *msg); … … 56 56 57 57 /* Path selection debug callback */ 58 static int rtdebug_out_cb(void * cbdata, struct msg * msg, struct fd_list * candidates)58 static int dbgrt_out_cb(void * cbdata, struct msg * msg, struct fd_list * candidates) 59 59 { 60 60 struct fd_list * li; … … 62 62 TRACE_ENTRY("%p %p %p", cbdata, msg, candidates); 63 63 64 fd_log_debug("[ rt_debug] OUT routing message: %p\n", msg);64 fd_log_debug("[dbg_rt] OUT routing message: %p\n", msg); 65 65 fd_msg_dump_walk(INFO, msg); 66 fd_log_debug("[ rt_debug] Current list of candidates (%p)\n", msg);66 fd_log_debug("[dbg_rt] Current list of candidates (%p)\n", msg); 67 67 68 68 for (li = candidates->next; li != candidates; li = li->next) { 69 69 struct rtd_candidate *c = (struct rtd_candidate *) li; 70 fd_log_debug("[ rt_debug] - %d\t%s\n", c->score, c->diamid);70 fd_log_debug("[dbg_rt] - %d\t%s\n", c->score, c->diamid); 71 71 } 72 72 … … 75 75 76 76 /* Register the callbacks to the daemon */ 77 static int rtdebug_main(char * conffile)77 static int dbgrt_main(char * conffile) 78 78 { 79 79 TRACE_ENTRY("%p", conffile); 80 80 81 CHECK_FCT( fd_rt_fwd_register ( rtdebug_fwd_cb, NULL, RT_FWD_ALL, &fwd_hdl ) );82 CHECK_FCT( fd_rt_out_register ( rtdebug_out_cb, NULL, -1 /* so that it is called late */, &out_hdl ) );81 CHECK_FCT( fd_rt_fwd_register ( dbgrt_fwd_cb, NULL, RT_FWD_ALL, &fwd_hdl ) ); 82 CHECK_FCT( fd_rt_out_register ( dbgrt_out_cb, NULL, -1 /* so that it is called late */, &out_hdl ) ); 83 83 84 84 return 0; … … 98 98 99 99 /* Define the entry point function */ 100 EXTENSION_ENTRY(" rt_debug", rtdebug_main);100 EXTENSION_ENTRY("dbg_rt", dbgrt_main);
Note: See TracChangeset
for help on using the changeset viewer.