diff --git a/openair2/UTIL/OMG/omg_vars.h b/openair2/UTIL/OMG/omg_vars.h index d236c312cce793e7c9219c1e65d52a4aa1a8006d..ce95fd79817070763801141fc5e0b96bb0fc7cbf 100644 --- a/openair2/UTIL/OMG/omg_vars.h +++ b/openair2/UTIL/OMG/omg_vars.h @@ -39,8 +39,8 @@ #include "omg.h" /*!A global variable used to store all the nodes information. It is an array in which every cell stocks the nodes information for a given mobility type. Its length is equal to the maximum number of mobility models that can exist in a single simulation scenario */ -node_list* node_vector[MAX_NUM_NODE_TYPES]; -node_list* node_vector_end[MAX_NUM_NODE_TYPES]; +node_list* node_vector[MAX_NUM_NODE_TYPES + 10 /*FIXME bad workaround for indexing node_vector with SUMO*/]; +node_list* node_vector_end[MAX_NUM_NODE_TYPES + 10 /*FIXME bad workaround for indexing node_vector_end with SUMO*/]; /*! A global variable which represents the length of the Node_Vector */ int node_vector_len[MAX_NUM_NODE_TYPES]; diff --git a/openair2/UTIL/OMG/sumo.c b/openair2/UTIL/OMG/sumo.c index aeb0f6ed7143594bd2d68529255bccbd7de4089d..0d0a91c6541878111cb0b6a4bf1fd2a1ee2505d3 100644 --- a/openair2/UTIL/OMG/sumo.c +++ b/openair2/UTIL/OMG/sumo.c @@ -171,8 +171,9 @@ start_sumo_generator (omg_global_param omg_param_list) node->generator = SUMO; // SUMO node->mob = mobility; - DevAssert( SUMO >= MAX_NUM_NODE_TYPES ); // FIXME node_vector_end is declared with MAX_NUM_NODE_TYPES elements, but here we are indexing with SUMO from enum mobility_types - DevAssert( SUMO >= MAX_NUM_NODE_TYPES ); // FIXME node_vector is declared with MAX_NUM_NODE_TYPES elements, but here we are indexing with SUMO from enum mobility_types + // FIXME! wrong use of node_vector and node_vector_end + // FIXME node_vector_end is declared with MAX_NUM_NODE_TYPES elements, but here we are indexing with SUMO from enum mobility_types + // FIXME node_vector is declared with MAX_NUM_NODE_TYPES elements, but here we are indexing with SUMO from enum mobility_types node_vector_end[SUMO] = (node_list *) add_entry (node, node_vector_end[SUMO]); @@ -297,7 +298,9 @@ desactivate_and_unmap (char *sumo_id) if (OAI_ID != -1) { //TODO generalize to UE and eNB (must change the method) - DevAssert( SUMO >= MAX_NUM_NODE_TYPES ); // FIXME node_vector is declared with MAX_NUM_NODE_TYPES elements, but here we are indexing with SUMO from enum mobility_types + + // FIXME! wrong use of node_vector + // FIXME node_vector is declared with MAX_NUM_NODE_TYPES elements, but here we are indexing with SUMO from enum mobility_types node_struct *node = find_node (node_vector[SUMO], OAI_ID, UE); if (node == NULL) node = find_node (node_vector[SUMO], OAI_ID, eNB); @@ -440,7 +443,8 @@ get_sumo_positions_updated (double cur_time) "--------GET SUMO Mobility for a group of ACTIVE OAI nodes--------\n"); #endif - DevAssert( SUMO >= MAX_NUM_NODE_TYPES ); // FIXME node_vector is declared with MAX_NUM_NODE_TYPES elements, but here we are indexing with SUMO from enum mobility_types + // FIXME! wrong use of node_vector + // FIXME node_vector is declared with MAX_NUM_NODE_TYPES elements, but here we are indexing with SUMO from enum mobility_types if (node_vector[SUMO] != NULL) { node_list *tmp = node_vector[SUMO];