Skip to content

Commit c648ea8

Browse files
authored
Merge pull request #985 from ajamshed/topics/dump_optional_interval_arg
Make `interval' argument optional as documented.
2 parents 04e15b1 + 28feeb2 commit c648ea8

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)