Mercurial > hg > freeDiameter
comparison libfdcore/p_dw.c @ 1238:8f9684264fe0
Change management of the p_reqin_count counter to be updated only on routable messages. This should limit the errors in the counter value resulting from rejected or discarded link-local messages.
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Thu, 10 Oct 2013 16:08:46 +0200 |
parents | 56c36d1007b4 |
children |
comparison
equal
deleted
inserted
replaced
1236:a0d9fb49694e | 1238:8f9684264fe0 |
---|---|
80 | 80 |
81 /* Add the content of the message (only the origin) */ | 81 /* Add the content of the message (only the origin) */ |
82 CHECK_FCT( fd_msg_add_origin ( msg, 1 ) ); | 82 CHECK_FCT( fd_msg_add_origin ( msg, 1 ) ); |
83 | 83 |
84 /* Now send this message */ | 84 /* Now send this message */ |
85 CHECK_FCT( fd_out_send(&msg, NULL, peer) ); | 85 CHECK_FCT( fd_out_send(&msg, NULL, peer, 0) ); |
86 | 86 |
87 /* And mark the pending DW */ | 87 /* And mark the pending DW */ |
88 peer->p_flags.pf_dw_pending = 1; | 88 peer->p_flags.pf_dw_pending = 1; |
89 | 89 |
90 return 0; | 90 return 0; |
103 if (req) { | 103 if (req) { |
104 /* If we receive a DWR, send back a DWA */ | 104 /* If we receive a DWR, send back a DWA */ |
105 CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, msg, 0 ) ); | 105 CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, msg, 0 ) ); |
106 CHECK_FCT( fd_msg_rescode_set( *msg, "DIAMETER_SUCCESS", NULL, NULL, 0 ) ); | 106 CHECK_FCT( fd_msg_rescode_set( *msg, "DIAMETER_SUCCESS", NULL, NULL, 0 ) ); |
107 CHECK_FCT( fd_msg_add_origin ( *msg, 1 ) ); | 107 CHECK_FCT( fd_msg_add_origin ( *msg, 1 ) ); |
108 CHECK_FCT( fd_out_send( msg, peer->p_cnxctx, peer) ); | 108 CHECK_FCT( fd_out_send( msg, peer->p_cnxctx, peer, 0) ); |
109 | 109 |
110 } else { | 110 } else { |
111 /* Discard the DWA */ | 111 /* Discard the DWA */ |
112 CHECK_FCT_DO( fd_msg_free(*msg), /* continue */ ); | 112 CHECK_FCT_DO( fd_msg_free(*msg), /* continue */ ); |
113 *msg = NULL; | 113 *msg = NULL; |