Permalink
Browse files

same correction as the previous one through the entire file.

  • Loading branch information...
1 parent 4b5defe commit c933199d856b42e0076a6f013a7e496ac5efcb28 jinmei committed Sep 10, 2000
Showing with 11 additions and 12 deletions.
  1. +11 −12 kame/kame/pim6sd/pim6_proto.c
View
23 kame/kame/pim6sd/pim6_proto.c
@@ -1704,13 +1704,6 @@ receive_pim6_join_prune(src, dst, pim_message, datalen)
if (my_action == PIM_ACTION_JOIN)
{
/* Override the Prune by scheduling a Join */
-
- /*
- * make a random delay between 0 to
- * PIM_RANDOM_DELAY_JOIN_TIMEOUT.
- * Note that the default value of the random
- * delay is 4.5, thus we need to multiply 10.
- */
jp_value = (RANDOM() % (int)(10 * PIM_RANDOM_DELAY_JOIN_TIMEOUT)) / 10;
/* TODO: XXX: TIMER implem. dependency! */
if (mrtentry_rp->jp_timer > jp_value)
@@ -1731,7 +1724,13 @@ receive_pim6_join_prune(src, dst, pim_message, datalen)
if (my_action == PIM_ACTION_JOIN)
{
- jp_value = (RANDOM() % 11) / (10 * PIM_RANDOM_DELAY_JOIN_TIMEOUT);
+ /*
+ * make a random delay between 0 to
+ * PIM_RANDOM_DELAY_JOIN_TIMEOUT.
+ * Note that the default value of the random
+ * delay is 4.5, thus we need to multiply 10.
+ */
+ jp_value = (RANDOM() % (int)(10 * PIM_RANDOM_DELAY_JOIN_TIMEOUT)) / 10;
/* TODO: XXX: TIMER implem. dependency! */
if (grpentry_ptr->grp_route->jp_timer >
jp_value)
@@ -1746,7 +1745,7 @@ receive_pim6_join_prune(src, dst, pim_message, datalen)
if (my_action == PIM_ACTION_JOIN)
{
- jp_value = (RANDOM() % 11) / (10 * PIM_RANDOM_DELAY_JOIN_TIMEOUT);
+ jp_value = (RANDOM() % (int)(10 * PIM_RANDOM_DELAY_JOIN_TIMEOUT)) / 10;
/* TODO: XXX: TIMER implem. dependency! */
if (mrtentry_srcs->jp_timer > jp_value)
SET_TIMER(mrtentry_srcs->jp_timer, jp_value);
@@ -1875,7 +1874,7 @@ receive_pim6_join_prune(src, dst, pim_message, datalen)
if (my_action == PIM_ACTION_JOIN)
{
/* Override the Prune by scheduling a Join */
- jp_value = (RANDOM() % 11) / (10 * PIM_RANDOM_DELAY_JOIN_TIMEOUT);
+ jp_value = (RANDOM() % (int)(10 * PIM_RANDOM_DELAY_JOIN_TIMEOUT)) / 10;
/* TODO: XXX: TIMER implem. dependency! */
if (mrtentry_ptr->jp_timer > jp_value)
SET_TIMER(mrtentry_ptr->jp_timer, jp_value);
@@ -1894,7 +1893,7 @@ receive_pim6_join_prune(src, dst, pim_message, datalen)
upstream_router);
if (my_action == PIM_ACTION_JOIN)
{
- jp_value = (RANDOM() % 11) / (10 * PIM_RANDOM_DELAY_JOIN_TIMEOUT);
+ jp_value = (RANDOM() % (int)(10 * PIM_RANDOM_DELAY_JOIN_TIMEOUT)) / 10;
/* TODO: XXX: TIMER implem. dependency! */
if (mrtentry_ptr->jp_timer > jp_value)
SET_TIMER(mrtentry_ptr->jp_timer, jp_value);
@@ -1925,7 +1924,7 @@ receive_pim6_join_prune(src, dst, pim_message, datalen)
if (my_action == PIM_ACTION_JOIN)
{
/* Override the Prune by scheduling a Join */
- jp_value = (RANDOM() % 11) / (10 * PIM_RANDOM_DELAY_JOIN_TIMEOUT);
+ jp_value = (RANDOM() % (int)(10 * PIM_RANDOM_DELAY_JOIN_TIMEOUT)) / 10;
/* TODO: XXX: TIMER implem. dependency! */
if (mrtentry_ptr->jp_timer > jp_value)
SET_TIMER(mrtentry_ptr->jp_timer, jp_value);

0 comments on commit c933199

Please sign in to comment.