Changeset 1299:035f489b845b in freeDiameter
- Timestamp:
- Jul 5, 2015, 12:06:37 AM (9 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
contrib/debian/changelog
r1297 r1299 4 4 * New contrib: Gx extension. 5 5 * rt_redirect.fdx and rt_load_balance.fdx improvement: use a hash table. Thanks Thomas. 6 * New hook HOOK_MESSAGE_SENDING to give a last chance to edit messages before they are sent. 7 This will be mostly used for enforcing interoperability constraints on non-compliant peers. 6 8 * Simplified log output. Old output can be recovered with DEBUG_WITH_META build option. 7 9 * Updated the internal counters for finer control on the load. -
extensions/dbg_msg_dumps/dbg_msg_dumps.c
r1247 r1299 119 119 LOG_SPLIT(FD_LOG_NOTICE, " ", buf, NULL); 120 120 break; 121 case HOOK_MESSAGE_SENDING: 122 LOG_N("SNDING to '%s':", peer_name); 123 LOG_SPLIT(FD_LOG_NOTICE, " ", buf, NULL); 124 break; 121 125 case HOOK_MESSAGE_SENT: 122 126 LOG_N("SND to '%s':", peer_name); … … 205 209 LOG_N("RCV from '%s': %s", peer_name, buf); 206 210 break; 211 case HOOK_MESSAGE_SENDING: 212 LOG_N("SNDING to '%s': %s", peer_name, buf); 213 break; 207 214 case HOOK_MESSAGE_SENT: 208 215 LOG_N("SND to '%s': %s", peer_name, buf); … … 284 291 LOG_N("RCV from '%s': %s", peer_name, buf); 285 292 break; 293 case HOOK_MESSAGE_SENDING: 294 LOG_N("SNDING to '%s': %s", peer_name, buf); 295 break; 286 296 case HOOK_MESSAGE_SENT: 287 297 LOG_N("SND to '%s': %s", peer_name, buf); … … 342 352 343 353 mask_errors = HOOK_MASK( HOOK_MESSAGE_FAILOVER, HOOK_MESSAGE_PARSING_ERROR, HOOK_MESSAGE_ROUTING_ERROR, HOOK_MESSAGE_DROPPED ); 344 mask_sndrcv = HOOK_MASK( HOOK_MESSAGE_RECEIVED, HOOK_MESSAGE_SENT ); 354 mask_sndrcv = HOOK_MASK( HOOK_MESSAGE_RECEIVED, HOOK_MESSAGE_SENT ); /* We don t access SENDING hook here */ 345 355 mask_routing= HOOK_MASK( HOOK_MESSAGE_LOCAL, HOOK_MESSAGE_ROUTING_FORWARD, HOOK_MESSAGE_ROUTING_LOCAL ); 346 356 mask_peers = HOOK_MASK( HOOK_PEER_CONNECT_FAILED, HOOK_PEER_CONNECT_SUCCESS ); -
extensions/test_app/ta_cli.c
r1214 r1299 71 71 72 72 CHECK_FCT_DO( fd_sess_state_retrieve( ta_cli_reg, sess, &mi ), return ); 73 TRACE_DEBUG( INFO, "%p %p", mi, data);74 73 ASSERT( (void *)mi == data ); 75 74 } -
include/freeDiameter/libfdcore.h
r1220 r1299 965 965 */ 966 966 967 HOOK_MESSAGE_SENDING, 968 /* Hook called when a message is about to be sent to a peer. The message pointer cannot be modified here, but the content of the message 969 could still be changed (for example add or remove some AVP. This is the last chance. 970 - {msg} points to the message. Some objects may not have been dictionary resolved. If you 971 try to call fd_msg_parse_dict, it will slow down the operation of the instance. 972 - {peer} is the one the message is being sent to. 973 - {other} is NULL. 974 - {permsgdata} points to existing structure if any, or a new structure otherwise. 975 */ 976 967 977 HOOK_MESSAGE_SENT, 968 978 /* Hook called when a message has been sent to a peer. The message might be freed as soon as the hook function returns, -
libfdcore/hooks.c
r1245 r1299 345 345 } 346 346 347 case HOOK_MESSAGE_SENDING: { 348 LOG_A("SENDING message to '%s'", peer ? peer->p_hdr.info.pi_diamid : "<unknown>"); 349 break; 350 } 351 347 352 case HOOK_MESSAGE_SENT: { 348 353 CHECK_MALLOC_DO(fd_msg_dump_summary(&hook_default_buf, &hook_default_len, NULL, msg, NULL, 0, 1), break); -
libfdcore/p_out.c
r1238 r1299 166 166 TRACE_ENTRY("%p %p %p", msg, cnx, peer); 167 167 CHECK_PARAMS( msg && *msg && (cnx || (peer && peer->p_cnxctx))); 168 169 fd_hook_call(HOOK_MESSAGE_SENDING, *msg, peer, NULL, fd_msg_pmdl_get(*msg)); 168 170 169 171 if (update_reqin_cnt && peer) {
Note: See TracChangeset
for help on using the changeset viewer.