patches13/0020-Fix-misuse-of-DevAssert-.-Using-bad-warkaround.-FIXM.patch
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7066 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -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];
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user