summaryrefslogtreecommitdiffstats
path: root/src/bp_sim.h
diff options
context:
space:
mode:
authorIdo Barnea <ibarnea@cisco.com>2016-11-09 13:25:44 +0200
committerIdo Barnea <ibarnea@cisco.com>2016-11-09 13:25:44 +0200
commita842c1ff4e894ef4750cec4bb1f3830a1de047b3 (patch)
tree174f10055c47f52ac74880a82bb6a367333ffae0 /src/bp_sim.h
parentae863c50263aa79391d4b81238c19a4b920ecc47 (diff)
Fix issue when --vlan option appearing before -i option
Signed-off-by: Ido Barnea <ibarnea@cisco.com>
Diffstat (limited to 'src/bp_sim.h')
-rwxr-xr-xsrc/bp_sim.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bp_sim.h b/src/bp_sim.h
index cd0f6a13..4899644b 100755
--- a/src/bp_sim.h
+++ b/src/bp_sim.h
@@ -824,6 +824,11 @@ public:
return ( (m_expected_portd>>1) * preview.getCores());
}
bool is_stateless(){
+ if (m_run_mode == RUN_MODE_INVALID) {
+ fprintf(stderr, "Internal bug: Calling is stateless before initializing run mode\n");
+ fprintf(stderr, "Try to put -i or -f <file> option as first in the option list\n");
+ exit(-1);
+ }
return (m_run_mode == RUN_MODE_INTERACTIVE ?true:false);
}
bool is_latency_enabled() {