Mercurial > hg > freeDiameter
comparison freeDiameter/routing_dispatch.c @ 454:f1484823cb4a
Small hack which might spear some concurrency problems and is quite harmless
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Thu, 29 Jul 2010 16:11:12 +0900 |
parents | 26aafbbc1640 |
children | 7250e91f0662 |
comparison
equal
deleted
inserted
replaced
453:9a8b3178a7a7 | 454:f1484823cb4a |
---|---|
812 | 812 |
813 ASSERT( qry_src ); /* if it is NULL, the message should have been in the LOCAL queue! */ | 813 ASSERT( qry_src ); /* if it is NULL, the message should have been in the LOCAL queue! */ |
814 | 814 |
815 /* Find the peer corresponding to this name */ | 815 /* Find the peer corresponding to this name */ |
816 CHECK_FCT( fd_peer_getbyid( qry_src, (void *) &peer ) ); | 816 CHECK_FCT( fd_peer_getbyid( qry_src, (void *) &peer ) ); |
817 fd_cpu_flush_cache(); | |
817 if ((!peer) || (peer->p_hdr.info.runtime.pir_state != STATE_OPEN)) { | 818 if ((!peer) || (peer->p_hdr.info.runtime.pir_state != STATE_OPEN)) { |
818 TRACE_DEBUG(INFO, "Unable to forward answer message to peer '%s', deleted or not in OPEN state.", qry_src); | 819 TRACE_DEBUG(INFO, "Unable to forward answer message to peer '%s', deleted or not in OPEN state.", qry_src); |
819 fd_msg_dump_walk(INFO, *pmsg); | 820 fd_msg_dump_walk(INFO, *pmsg); |
820 fd_msg_free(*pmsg); | 821 fd_msg_free(*pmsg); |
821 *pmsg = NULL; | 822 *pmsg = NULL; |
931 break; | 932 break; |
932 | 933 |
933 /* Search for the peer */ | 934 /* Search for the peer */ |
934 CHECK_FCT( fd_peer_getbyid( c->diamid, (void *)&peer ) ); | 935 CHECK_FCT( fd_peer_getbyid( c->diamid, (void *)&peer ) ); |
935 | 936 |
937 fd_cpu_flush_cache(); | |
936 if (peer && (peer->p_hdr.info.runtime.pir_state == STATE_OPEN)) { | 938 if (peer && (peer->p_hdr.info.runtime.pir_state == STATE_OPEN)) { |
937 /* Send to this one */ | 939 /* Send to this one */ |
938 CHECK_FCT_DO( fd_out_send(pmsg, NULL, peer, 0), continue ); | 940 CHECK_FCT_DO( fd_out_send(pmsg, NULL, peer, 0), continue ); |
939 | 941 |
940 /* If the sending was successful */ | 942 /* If the sending was successful */ |