Use (std) bool instead of custom bool types
OAI is riddled with boolean_t, FALSE, TRUE, etc. This makes no sense, as there is a standard bool type, and could lead to nasty bugs if a definition of a bool is non-standard (0 == false, true == !false). This commit removes all non-standard bools in the whole project.
This commit is contained in:
@@ -120,12 +120,12 @@ static socket_id_t * _as_simulator_mme_sid = NULL;
|
||||
/*
|
||||
* UE NAS process connection manager's running indicator
|
||||
*/
|
||||
static int _as_simulator_ue_is_running = FALSE;
|
||||
static bool _as_simulator_ue_is_running = false;
|
||||
|
||||
/*
|
||||
* MME NAS process connection manager's running indicator
|
||||
*/
|
||||
static int _as_simulator_mme_is_running = FALSE;
|
||||
static bool _as_simulator_mme_is_running = false;
|
||||
|
||||
static int _set_signal_handler(int signal, void (handler)(int));
|
||||
static void _signal_handler(int signal_number);
|
||||
@@ -307,8 +307,8 @@ static void _signal_handler(int signal_number)
|
||||
{
|
||||
printf("\nWARNING\t: %s - Signal %d received\n", __FUNCTION__,
|
||||
signal_number);
|
||||
_as_simulator_ue_is_running = FALSE;
|
||||
_as_simulator_mme_is_running = FALSE;
|
||||
_as_simulator_ue_is_running = false;
|
||||
_as_simulator_mme_is_running = false;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -321,7 +321,7 @@ static void* _as_simulator_ue_mngr(void* args)
|
||||
int msg_id;
|
||||
as_message_t msg;
|
||||
|
||||
_as_simulator_ue_is_running = TRUE;
|
||||
_as_simulator_ue_is_running = true;
|
||||
|
||||
printf("INFO\t: %s - UE connection manager started\n", __FUNCTION__);
|
||||
|
||||
@@ -388,7 +388,7 @@ static void* _as_simulator_ue_mngr(void* args)
|
||||
}
|
||||
|
||||
/* Close the connection to the network sublayer */
|
||||
_as_simulator_ue_is_running = FALSE;
|
||||
_as_simulator_ue_is_running = false;
|
||||
printf("ERROR\t: The UE connection manager exited\n");
|
||||
return (NULL);
|
||||
}
|
||||
@@ -403,7 +403,7 @@ static void* _as_simulator_mme_mngr(void* args)
|
||||
int msg_id;
|
||||
as_message_t msg;
|
||||
|
||||
_as_simulator_mme_is_running = TRUE;
|
||||
_as_simulator_mme_is_running = true;
|
||||
|
||||
printf("INFO\t: %s - MME connection manager started\n", __FUNCTION__);
|
||||
|
||||
@@ -469,7 +469,7 @@ static void* _as_simulator_mme_mngr(void* args)
|
||||
}
|
||||
|
||||
/* Close the connection to the network sublayer */
|
||||
_as_simulator_mme_is_running = FALSE;
|
||||
_as_simulator_mme_is_running = false;
|
||||
printf("ERROR\t: %s - The MME connection manager exited\n", __FUNCTION__);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ static const OctetString* _network_simulator_pdn[NETWORK_IP_MAX][2] = {
|
||||
static int _set_signal_handler(int signal, void (handler)(int));
|
||||
static void _signal_handler(int signal_number);
|
||||
static int _process_message(int msgID, const as_message_t* req);
|
||||
static int _assign_pdn_address(int ue_pdn_type, int is_initial, int* pdn_type, OctetString* pdn);
|
||||
static int _assign_pdn_address(int ue_pdn_type, bool is_initial, int* pdn_type, OctetString* pdn);
|
||||
|
||||
/* Functions used to process messages received from the Access Stratum */
|
||||
static int _process_cell_info_req(const cell_info_req_t* req, cell_info_cnf_t* rsp);
|
||||
@@ -283,7 +283,7 @@ int main (int argc, const char* argv[])
|
||||
/*
|
||||
* Network simulator main loop
|
||||
*/
|
||||
while (TRUE) {
|
||||
while (true) {
|
||||
as_message_t msg;
|
||||
|
||||
/* Receive message from the NAS */
|
||||
@@ -1072,11 +1072,11 @@ static int _process_pdn_connectivity_request(const pdn_connectivity_request_msg*
|
||||
/* Assign PDN address */
|
||||
if (apn.length > 0) {
|
||||
request->accesspointname.accesspointnamevalue = apn;
|
||||
esm_cause = _assign_pdn_address(requested_pdn_type, FALSE, &pdn_type,
|
||||
esm_cause = _assign_pdn_address(requested_pdn_type, false, &pdn_type,
|
||||
&request->pdnaddress.pdnaddressinformation);
|
||||
} else {
|
||||
request->accesspointname.accesspointnamevalue = EURECOM_APN;
|
||||
esm_cause = _assign_pdn_address(requested_pdn_type, TRUE, &pdn_type,
|
||||
esm_cause = _assign_pdn_address(requested_pdn_type, true, &pdn_type,
|
||||
&request->pdnaddress.pdnaddressinformation);
|
||||
}
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ int main (int argc, const char* argv[])
|
||||
/*
|
||||
* User simulator main loop
|
||||
*/
|
||||
while (TRUE) {
|
||||
while (true) {
|
||||
char c;
|
||||
int len;
|
||||
|
||||
@@ -293,7 +293,7 @@ static void _signal_handler(int signal_number)
|
||||
*/
|
||||
static void* _receive_thread(void* arg)
|
||||
{
|
||||
while (TRUE) {
|
||||
while (true) {
|
||||
/* Receive AT response from the NAS sublayer */
|
||||
int rbytes = USER_RECV(_user_simulator_recv_buffer,
|
||||
USER_SIMULATOR_BUFFER_SIZE);
|
||||
|
||||
Reference in New Issue
Block a user