summaryrefslogtreecommitdiffstats
path: root/src/tuple_gen.h
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2016-05-03 16:08:45 +0300
committerHanoh Haim <hhaim@cisco.com>2016-05-03 16:08:45 +0300
commitdbe44f64ec7cff8d55400327e5f6994ac1fc87bb (patch)
treedff61999decaf7b8c8caa5356f31c265d3ea13e6 /src/tuple_gen.h
parent719054b1520da67ced27f1a346e27fbee88e4b34 (diff)
fix trex-204 by Wenxian with minor changes
Diffstat (limited to 'src/tuple_gen.h')
-rwxr-xr-xsrc/tuple_gen.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tuple_gen.h b/src/tuple_gen.h
index d34e27bc..b2f6e34a 100755
--- a/src/tuple_gen.h
+++ b/src/tuple_gen.h
@@ -880,18 +880,28 @@ struct CTupleGenYamlInfo {
public:
bool is_valid(uint32_t num_threads,bool is_plugins);
uint8_t get_server_pool_id(std::string name){
+ if (name=="default") {
+ return 0;
+ }
for (uint8_t i=0;i<m_server_pool.size();i++) {
if (m_server_pool[i].m_name==name)
return i;
}
+ printf("ERROR invalid server pool name %s, please review your YAML file\n",(char *)name.c_str());
+ exit(-1);
return 0;
}
uint8_t get_client_pool_id(std::string name){
+ if (name=="default") {
+ return 0;
+ }
for (uint8_t i=0;i<m_client_pool.size();i++) {
if (m_client_pool[i].m_name==name)
return i;
}
+ printf("ERROR invalid client pool name %s, please review your YAML file\n",(char *)name.c_str());
+ exit(-1);
return 0;
}
};