Skip to content

Commit 28feeb2

Browse files
committed
Make `interval' argument optional as documented.
The wiki page (https://github.com/NetSys/bess/wiki/Built-In-Modules-and-Ports) mentions that the argument is optional. However the module fails to get instantiated without adding this argument. This patch fixes this. Signed-off-by: Muhammad Asim Jamshed <muhammad.jamshed@intel.com> Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
1 parent 6786d37 commit 28feeb2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/modules/dump.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ CommandResponse Dump::Init(const bess::pb::DumpArg &arg) {
4848
// cannot get a context-based current nanoseconds
4949
min_interval_ns_ = DEFAULT_INTERVAL_NS;
5050
next_ns_ = tsc_to_ns(rdtsc());
51-
return CommandSetInterval(arg);
51+
if (arg.interval())
52+
return CommandSetInterval(arg);
53+
return CommandSuccess();
5254
}
5355

5456
void Dump::ProcessBatch(Context *ctx, bess::PacketBatch *batch) {

0 commit comments

Comments
 (0)