Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

same correction as the previous one through the entire file.

  • Loading branch information...
commit c933199d856b42e0076a6f013a7e496ac5efcb28 1 parent 4b5defe
jinmei authored

Showing 1 changed file with 11 additions and 12 deletions. Show diff stats Hide diff stats

  1. +11 12 kame/kame/pim6sd/pim6_proto.c
23 kame/kame/pim6sd/pim6_proto.c
@@ -1704,13 +1704,6 @@ receive_pim6_join_prune(src, dst, pim_message, datalen)
1704 1704 if (my_action == PIM_ACTION_JOIN)
1705 1705 {
1706 1706 /* Override the Prune by scheduling a Join */
1707   -
1708   - /*
1709   - * make a random delay between 0 to
1710   - * PIM_RANDOM_DELAY_JOIN_TIMEOUT.
1711   - * Note that the default value of the random
1712   - * delay is 4.5, thus we need to multiply 10.
1713   - */
1714 1707 jp_value = (RANDOM() % (int)(10 * PIM_RANDOM_DELAY_JOIN_TIMEOUT)) / 10;
1715 1708 /* TODO: XXX: TIMER implem. dependency! */
1716 1709 if (mrtentry_rp->jp_timer > jp_value)
@@ -1731,7 +1724,13 @@ receive_pim6_join_prune(src, dst, pim_message, datalen)
1731 1724 if (my_action == PIM_ACTION_JOIN)
1732 1725 {
1733 1726
1734   - jp_value = (RANDOM() % 11) / (10 * PIM_RANDOM_DELAY_JOIN_TIMEOUT);
  1727 + /*
  1728 + * make a random delay between 0 to
  1729 + * PIM_RANDOM_DELAY_JOIN_TIMEOUT.
  1730 + * Note that the default value of the random
  1731 + * delay is 4.5, thus we need to multiply 10.
  1732 + */
  1733 + jp_value = (RANDOM() % (int)(10 * PIM_RANDOM_DELAY_JOIN_TIMEOUT)) / 10;
1735 1734 /* TODO: XXX: TIMER implem. dependency! */
1736 1735 if (grpentry_ptr->grp_route->jp_timer >
1737 1736 jp_value)
@@ -1746,7 +1745,7 @@ receive_pim6_join_prune(src, dst, pim_message, datalen)
1746 1745 if (my_action == PIM_ACTION_JOIN)
1747 1746 {
1748 1747
1749   - jp_value = (RANDOM() % 11) / (10 * PIM_RANDOM_DELAY_JOIN_TIMEOUT);
  1748 + jp_value = (RANDOM() % (int)(10 * PIM_RANDOM_DELAY_JOIN_TIMEOUT)) / 10;
1750 1749 /* TODO: XXX: TIMER implem. dependency! */
1751 1750 if (mrtentry_srcs->jp_timer > jp_value)
1752 1751 SET_TIMER(mrtentry_srcs->jp_timer, jp_value);
@@ -1875,7 +1874,7 @@ receive_pim6_join_prune(src, dst, pim_message, datalen)
1875 1874 if (my_action == PIM_ACTION_JOIN)
1876 1875 {
1877 1876 /* Override the Prune by scheduling a Join */
1878   - jp_value = (RANDOM() % 11) / (10 * PIM_RANDOM_DELAY_JOIN_TIMEOUT);
  1877 + jp_value = (RANDOM() % (int)(10 * PIM_RANDOM_DELAY_JOIN_TIMEOUT)) / 10;
1879 1878 /* TODO: XXX: TIMER implem. dependency! */
1880 1879 if (mrtentry_ptr->jp_timer > jp_value)
1881 1880 SET_TIMER(mrtentry_ptr->jp_timer, jp_value);
@@ -1894,7 +1893,7 @@ receive_pim6_join_prune(src, dst, pim_message, datalen)
1894 1893 upstream_router);
1895 1894 if (my_action == PIM_ACTION_JOIN)
1896 1895 {
1897   - jp_value = (RANDOM() % 11) / (10 * PIM_RANDOM_DELAY_JOIN_TIMEOUT);
  1896 + jp_value = (RANDOM() % (int)(10 * PIM_RANDOM_DELAY_JOIN_TIMEOUT)) / 10;
1898 1897 /* TODO: XXX: TIMER implem. dependency! */
1899 1898 if (mrtentry_ptr->jp_timer > jp_value)
1900 1899 SET_TIMER(mrtentry_ptr->jp_timer, jp_value);
@@ -1925,7 +1924,7 @@ receive_pim6_join_prune(src, dst, pim_message, datalen)
1925 1924 if (my_action == PIM_ACTION_JOIN)
1926 1925 {
1927 1926 /* Override the Prune by scheduling a Join */
1928   - jp_value = (RANDOM() % 11) / (10 * PIM_RANDOM_DELAY_JOIN_TIMEOUT);
  1927 + jp_value = (RANDOM() % (int)(10 * PIM_RANDOM_DELAY_JOIN_TIMEOUT)) / 10;
1929 1928 /* TODO: XXX: TIMER implem. dependency! */
1930 1929 if (mrtentry_ptr->jp_timer > jp_value)
1931 1930 SET_TIMER(mrtentry_ptr->jp_timer, jp_value);

0 comments on commit c933199

Please sign in to comment.
Something went wrong with that request. Please try again.