Skip to content

Divide by zero:ConsumerCbr's Frequency maybe set zero,and cause bug!!! #114

@fgfxf

Description

@fgfxf

the consumer 's interest packet's frequency is a double varble,and can be set to zero.

ndnSIM/apps/ndn-consumer-cbr.cpp

col 93:
m_sendEvent = Simulator::Schedule((m_random == 0) ? Seconds(1.0 / m_frequency)
: Seconds(m_random->GetValue()),
&Consumer::SendPacket, this);

SetAttribute("Frequency", ns3::StringValue("0"));

i want to set Frequency small to make frequency little.

SetAttribute("Frequency", ns3::StringValue("0.1")); // 10 second a interests

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions