fix LOG_X macros
Some of them might not be correctly handled. I put /* TODO: XXX */ where I didn't know if the fix was correct.
This commit is contained in:
@@ -410,7 +410,7 @@ nwGtpv1uDestroyTunnelEndPoint( NwGtpv1uStackT *thiz,
|
||||
NwGtpv1uTunnelEndPointT *pRemovedTeid;
|
||||
|
||||
if(pUlpReq->apiInfo.destroyTunnelEndPointInfo.hStackSessionHandle) {
|
||||
GTPU_DEBUG( "Destroying Tunnel end-point '%x'",
|
||||
GTPU_DEBUG( "Destroying Tunnel end-point '%lx'",
|
||||
pUlpReq->apiInfo.destroyTunnelEndPointInfo.hStackSessionHandle);
|
||||
pRemovedTeid = RB_REMOVE(NwGtpv1uTunnelEndPointIdentifierMap, &(thiz->teidMap),
|
||||
(NwGtpv1uTunnelEndPointT *)(
|
||||
@@ -423,7 +423,7 @@ nwGtpv1uDestroyTunnelEndPoint( NwGtpv1uStackT *thiz,
|
||||
(NwGtpv1uTunnelEndPointT *)
|
||||
pUlpReq->apiInfo.destroyTunnelEndPointInfo.hStackSessionHandle);
|
||||
} else {
|
||||
GTPU_WARNING("Non-existent Tunnel end-point handle '%x'",
|
||||
GTPU_WARNING("Non-existent Tunnel end-point handle '%lx'",
|
||||
pUlpReq->apiInfo.destroyTunnelEndPointInfo.hStackSessionHandle);
|
||||
}
|
||||
|
||||
|
||||
@@ -523,7 +523,7 @@ int nas_message_encode(
|
||||
/* Compute the NAS message authentication code */
|
||||
LOG_TRACE(DEBUG,
|
||||
"offset %d = %d - %d, hdr encode = %d, length = %d bytes = %d",
|
||||
offset, size, sizeof(uint8_t),
|
||||
offset, size, (int)sizeof(uint8_t),
|
||||
size, length, bytes);
|
||||
uint32_t mac = _nas_message_get_mac(
|
||||
buffer + offset,
|
||||
|
||||
@@ -131,7 +131,7 @@ do {
|
||||
do { \
|
||||
nas_log_func_indent -= 2; \
|
||||
LOG_D(NAS, " %s:%d %*sLeaving %s(rc = %ld)\n", __FILE__, __LINE__, nas_log_func_indent, "", \
|
||||
__FUNCTION__, (long) rETURNcODE); \
|
||||
__FUNCTION__, (long) (rETURNcODE)); \
|
||||
return (rETURNcODE); \
|
||||
} while (0)
|
||||
|
||||
@@ -146,7 +146,7 @@ extern int nas_log_func_indent;
|
||||
# define LOG_FUNC_RETURN(rETURNcODE) \
|
||||
do { \
|
||||
LOG_TRACE(FUNC_OUT, "Leaving %s(rc = %ld)", __FUNCTION__, \
|
||||
(long) rETURNcODE); \
|
||||
(long) (rETURNcODE)); \
|
||||
return (rETURNcODE); \
|
||||
} while(0)
|
||||
|
||||
|
||||
@@ -807,8 +807,7 @@ int emm_proc_plmn_selection_end(int found, tac_t tac, ci_t ci, AcT_t rat)
|
||||
if (is_forbidden) {
|
||||
/* The selected cell is known not to be able to provide normal
|
||||
* service */
|
||||
LOG_TRACE(INFO, "EMM-IDLE - UE may camp on this acceptable cell ",
|
||||
"for limited services");
|
||||
LOG_TRACE(INFO, "EMM-IDLE - UE may camp on this acceptable cell for limited services");
|
||||
|
||||
/* Save the index of the first forbidden PLMN */
|
||||
if (_emm_plmn_list.fplmn < 0) {
|
||||
@@ -819,8 +818,7 @@ int emm_proc_plmn_selection_end(int found, tac_t tac, ci_t ci, AcT_t rat)
|
||||
} else {
|
||||
/* A suitable cell has been found and the PLMN or tracking area
|
||||
* is not in the forbidden list */
|
||||
LOG_TRACE(INFO, "EMM-IDLE - UE may camp on this suitable cell ",
|
||||
"for normal services");
|
||||
LOG_TRACE(INFO, "EMM-IDLE - UE may camp on this suitable cell for normal services");
|
||||
_emm_plmn_list.fplmn = -1;
|
||||
_emm_plmn_list.param[index].stat = NET_OPER_CURRENT;
|
||||
emm_sap.primitive = EMMREG_REGISTER_CNF;
|
||||
|
||||
@@ -205,7 +205,7 @@ int s1ap_eNB_handle_message(uint32_t assoc_id, int32_t stream,
|
||||
if (message.procedureCode > sizeof(messages_callback) / (3 * sizeof(
|
||||
s1ap_message_decoded_callback))
|
||||
|| (message.direction > S1AP_PDU_PR_unsuccessfulOutcome)) {
|
||||
S1AP_ERROR("[SCTP %d] Either procedureCode %d or direction %d exceed expected\n",
|
||||
S1AP_ERROR("[SCTP %d] Either procedureCode %ld or direction %d exceed expected\n",
|
||||
assoc_id, message.procedureCode, message.direction);
|
||||
return -1;
|
||||
}
|
||||
@@ -214,7 +214,7 @@ int s1ap_eNB_handle_message(uint32_t assoc_id, int32_t stream,
|
||||
* This can mean not implemented or no procedure for eNB (wrong direction).
|
||||
*/
|
||||
if (messages_callback[message.procedureCode][message.direction-1] == NULL) {
|
||||
S1AP_ERROR("[SCTP %d] No handler for procedureCode %d in %s\n",
|
||||
S1AP_ERROR("[SCTP %d] No handler for procedureCode %ld in %s\n",
|
||||
assoc_id, message.procedureCode,
|
||||
s1ap_direction2String[message.direction]);
|
||||
return -1;
|
||||
@@ -452,10 +452,10 @@ int s1ap_eNB_handle_error_indication(uint32_t assoc_id,
|
||||
return -1;
|
||||
}
|
||||
if ( s1_error_indication_p->presenceMask & S1AP_ERRORINDICATIONIES_MME_UE_S1AP_ID_PRESENT) {
|
||||
S1AP_WARN("Received S1 Error indication MME UE S1AP ID 0x%x\n", s1_error_indication_p->mme_ue_s1ap_id);
|
||||
S1AP_WARN("Received S1 Error indication MME UE S1AP ID 0x%lx\n", s1_error_indication_p->mme_ue_s1ap_id);
|
||||
}
|
||||
if ( s1_error_indication_p->presenceMask & S1AP_ERRORINDICATIONIES_ENB_UE_S1AP_ID_PRESENT) {
|
||||
S1AP_WARN("Received S1 Error indication eNB UE S1AP ID 0x%x\n", s1_error_indication_p->eNB_UE_S1AP_ID);
|
||||
S1AP_WARN("Received S1 Error indication eNB UE S1AP ID 0x%lx\n", s1_error_indication_p->eNB_UE_S1AP_ID);
|
||||
}
|
||||
|
||||
if ( s1_error_indication_p->presenceMask & S1AP_ERRORINDICATIONIES_CAUSE_PRESENT) {
|
||||
@@ -710,7 +710,7 @@ int s1ap_eNB_handle_initial_context_request(uint32_t assoc_id,
|
||||
if ((ue_desc_p = s1ap_eNB_get_ue_context(mme_desc_p->s1ap_eNB_instance,
|
||||
initialContextSetupRequest_p->eNB_UE_S1AP_ID)) == NULL) {
|
||||
S1AP_ERROR("[SCTP %d] Received initial context setup request for non "
|
||||
"existing UE context 0x%06x\n", assoc_id,
|
||||
"existing UE context 0x%06lx\n", assoc_id,
|
||||
initialContextSetupRequest_p->eNB_UE_S1AP_ID);
|
||||
return -1;
|
||||
}
|
||||
@@ -835,7 +835,7 @@ int s1ap_eNB_handle_ue_context_release_command(uint32_t assoc_id,
|
||||
if ((ue_desc_p = s1ap_eNB_get_ue_context(mme_desc_p->s1ap_eNB_instance,
|
||||
enb_ue_s1ap_id)) == NULL) {
|
||||
S1AP_ERROR("[SCTP %d] Received UE context release command for non "
|
||||
"existing UE context 0x%06x\n",
|
||||
"existing UE context 0x%06lx\n",
|
||||
assoc_id,
|
||||
enb_ue_s1ap_id);
|
||||
/*MessageDef *msg_complete_p;
|
||||
@@ -900,7 +900,7 @@ int s1ap_eNB_handle_e_rab_setup_request(uint32_t assoc_id,
|
||||
if ((ue_desc_p = s1ap_eNB_get_ue_context(mme_desc_p->s1ap_eNB_instance,
|
||||
s1ap_E_RABSetupRequest->eNB_UE_S1AP_ID)) == NULL) {
|
||||
S1AP_ERROR("[SCTP %d] Received initial context setup request for non "
|
||||
"existing UE context 0x%06x\n", assoc_id,
|
||||
"existing UE context 0x%06lx\n", assoc_id,
|
||||
s1ap_E_RABSetupRequest->eNB_UE_S1AP_ID);
|
||||
return -1;
|
||||
}
|
||||
@@ -915,7 +915,7 @@ int s1ap_eNB_handle_e_rab_setup_request(uint32_t assoc_id,
|
||||
ue_desc_p->rx_stream = stream;
|
||||
|
||||
if ( ue_desc_p->mme_ue_s1ap_id != s1ap_E_RABSetupRequest->mme_ue_s1ap_id){
|
||||
S1AP_WARN("UE context mme_ue_s1ap_id is different form that of the message (%d != %d)",
|
||||
S1AP_WARN("UE context mme_ue_s1ap_id is different form that of the message (%d != %ld)",
|
||||
ue_desc_p->mme_ue_s1ap_id, s1ap_E_RABSetupRequest->mme_ue_s1ap_id);
|
||||
|
||||
}
|
||||
|
||||
@@ -379,7 +379,7 @@ void *udp_eNB_task(void *args_p)
|
||||
sizeof(struct sockaddr_in));
|
||||
|
||||
if (bytes_written != udp_data_req_p->buffer_length) {
|
||||
LOG_E(UDP_, "There was an error while writing to socket %u rc %d"
|
||||
LOG_E(UDP_, "There was an error while writing to socket %d rc %zd"
|
||||
"(%d:%s) May be normal if GTPU kernel module loaded on same host (may NF_DROP IP packet)\n",
|
||||
udp_sd, bytes_written, errno, strerror(errno));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user