Mercurial > hg > freeDiameter
comparison libfdcore/p_psm.c @ 1326:afe0ecdb0692
Add config option if Route-Record AVPs should be added in Answers.
Some software does not handle them correctly.
author | Thomas Klausner <tk@giga.or.at> |
---|---|
date | Mon, 27 Nov 2017 15:18:57 +0100 |
parents | 8288982c63b7 |
children | e7726fae1e7f |
comparison
equal
deleted
inserted
replaced
1325:ae81cd81ab09 | 1326:afe0ecdb0692 |
---|---|
550 case STATE_OPEN: | 550 case STATE_OPEN: |
551 /* We received a valid routable message, update the expiry timer */ | 551 /* We received a valid routable message, update the expiry timer */ |
552 CHECK_FCT_DO( fd_p_expi_update(peer), goto psm_end ); | 552 CHECK_FCT_DO( fd_p_expi_update(peer), goto psm_end ); |
553 | 553 |
554 /* Set the message source and add the Route-Record */ | 554 /* Set the message source and add the Route-Record */ |
555 CHECK_FCT_DO( fd_msg_source_setrr( msg, peer->p_hdr.info.pi_diamid, peer->p_hdr.info.pi_diamidlen, fd_g_config->cnf_dict ), goto psm_end); | 555 if (fd_g_config->cnf_rr_in_answers || (hdr->msg_flags & CMD_FLAG_REQUEST)) { |
556 CHECK_FCT_DO( fd_msg_source_setrr( msg, peer->p_hdr.info.pi_diamid, peer->p_hdr.info.pi_diamidlen, fd_g_config->cnf_dict ), goto psm_end); | |
557 } | |
556 | 558 |
557 if ((hdr->msg_flags & CMD_FLAG_REQUEST)) { | 559 if ((hdr->msg_flags & CMD_FLAG_REQUEST)) { |
558 /* Mark the incoming request so that we know we have pending answers for this peer */ | 560 /* Mark the incoming request so that we know we have pending answers for this peer */ |
559 CHECK_POSIX_DO( pthread_mutex_lock(&peer->p_state_mtx), goto psm_end ); | 561 CHECK_POSIX_DO( pthread_mutex_lock(&peer->p_state_mtx), goto psm_end ); |
560 peer->p_reqin_count++; | 562 peer->p_reqin_count++; |