comparison libfdcore/routing_dispatch.c @ 1212:c38bb8b69c43

Fix message rtd handling for extensions based on this data
author Sebastien Decugis <sdecugis@freediameter.net>
date Mon, 17 Jun 2013 18:19:53 +0800
parents 6a1042d8075b
children 581bbd48524a
comparison
equal deleted inserted replaced
1211:98478a8aabb1 1212:c38bb8b69c43
940 } 940 }
941 941
942 /* Go to next AVP */ 942 /* Go to next AVP */
943 CHECK_FCT( fd_msg_browse(avp, MSG_BRW_NEXT, &avp, NULL) ); 943 CHECK_FCT( fd_msg_browse(avp, MSG_BRW_NEXT, &avp, NULL) );
944 } 944 }
945
946 /* Save the routing information in the message */
947 CHECK_FCT( fd_msg_rt_associate ( msgptr, rtd ) );
945 } 948 }
946 949
947 /* Note: we reset the scores and pass the message to the callbacks, maybe we could re-use the saved scores when we have received an error ? -- TODO */ 950 /* Note: we reset the scores and pass the message to the callbacks, maybe we could re-use the saved scores when we have received an error ? -- TODO */
948 951
949 /* Ok, we have our list in rtd now, let's (re)initialize the scores */ 952 /* Ok, we have our list in rtd now, let's (re)initialize the scores */
982 } 985 }
983 } 986 }
984 987
985 /* Order the candidate peers by score attributed by the callbacks */ 988 /* Order the candidate peers by score attributed by the callbacks */
986 CHECK_FCT( fd_rtd_candidate_reorder(candidates) ); 989 CHECK_FCT( fd_rtd_candidate_reorder(candidates) );
987
988 /* Save the routing information in the message */
989 CHECK_FCT( fd_msg_rt_associate ( msgptr, &rtd ) );
990 990
991 /* Now try sending the message */ 991 /* Now try sending the message */
992 for (li = candidates->prev; li != candidates; li = li->prev) { 992 for (li = candidates->prev; li != candidates; li = li->prev) {
993 struct fd_peer * peer; 993 struct fd_peer * peer;
994 994
"Welcome to our mercurial repository"