Commit b7f699a3 authored by thomasl's avatar thomasl

bug fixing during CPRIGW integration

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6986 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent f48ea731
......@@ -1015,7 +1015,7 @@ void itti_wait_tasks_end(void) {
if (ready_tasks > 0) {
usleep (100 * 1000);
}
} while ((ready_tasks > 0) && (retries--));
} while ((ready_tasks > 0) && (retries--)&& (!end) );
printf("ready_tasks %d\n",ready_tasks);
......
......@@ -199,6 +199,7 @@ sctp_handle_new_association_req(
&in);
if (s > 0 ) {
if (((struct sockaddr_in*)ifa->ifa_addr)->sin_addr.s_addr == in.s_addr) {
#if 0
memset(&ifr, 0, sizeof(ifr));
snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%s",ifa->ifa_name);
if (setsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, (void *)&ifr, sizeof(ifr)) < 0) {
......@@ -208,7 +209,22 @@ sctp_handle_new_association_req(
SCTP_DEBUG("Setsockopt SOL_SOCKET socket bound to : %s\n",
ifa->ifa_name);
}
#else
struct sockaddr_in locaddr;
locaddr.sin_family = AF_INET;
locaddr.sin_port = htons(sctp_new_association_req_p->port);
locaddr.sin_addr.s_addr = in.s_addr;
if (sctp_bindx(sd, (struct sockaddr*)&locaddr, 1, SCTP_BINDX_ADD_ADDR) < 0) {
SCTP_ERROR("sctp_bindx SCTP_BINDX_ADD_ADDR failed: %s\n",
strerror(errno));
} else {
SCTP_DEBUG("sctp_bindx SCTP_BINDX_ADD_ADDR socket bound to : %s\n",
inet_ntoa(locaddr.sin_addr));
}
#endif
break;
}
}
} else if (sctp_new_association_req_p->local_address.ipv6 && family == AF_INET6) {
......@@ -298,7 +314,7 @@ sctp_handle_new_association_req(
}
/* Connect to remote host and port */
if (sctp_connectx(sd, (struct sockaddr *)addr, used_address, &assoc_id) < 0)
if (sctp_connectx(sd, (struct sockaddr *)addr, 1, &assoc_id) < 0)
{
/* sctp_connectx on non-blocking socket return EINPROGRESS */
if (errno != EINPROGRESS) {
......
......@@ -326,7 +326,7 @@ typedef struct {
#if defined(CBMIMO1) || defined(EXMIMO)
#define MAX_FRAME_NUMBER 0x400
#define NUMBER_OF_eNB_MAX 1
#define NUMBER_OF_UE_MAX 2
#define NUMBER_OF_UE_MAX 16
#define NUMBER_OF_CONNECTED_eNB_MAX 3
#else
#define MAX_FRAME_NUMBER 0xFFFF
......
......@@ -47,7 +47,7 @@ enum THREAD_INDEX { OPENAIR_THREAD_INDEX = 0,
#define OPENAIR_THREAD_PRIORITY 255
#define OPENAIR_THREAD_STACK_SIZE 8192 //4096 //RTL_PTHREAD_STACK_MIN*6
#define OPENAIR_THREAD_STACK_SIZE PTHREAD_STACK_MIN //4096 //RTL_PTHREAD_STACK_MIN*6
//#define DLC_THREAD_STACK_SIZE 4096 //DLC stack size
enum openair_SCHED_STATUS {
......
......@@ -2402,8 +2402,7 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
phy_procedures_emos_eNB_TX(subframe, phy_vars_eNB);
#endif
#ifndef EXMIMO
#ifndef USRP
#if !(defined(EXMIMO) || defined(USRP) || defined (CPRIGW))
if (abstraction_flag==0) {
start_meas(&phy_vars_eNB->ofdm_mod_stats);
do_OFDM_mod(phy_vars_eNB->lte_eNB_common_vars.txdataF[0],
......@@ -2416,7 +2415,6 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
&phy_vars_eNB->lte_frame_parms);
stop_meas(&phy_vars_eNB->ofdm_mod_stats);
}
#endif
#endif
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX,0);
......
......@@ -560,7 +560,7 @@ rrc_eNB_free_UE_index(
eNB_rrc_inst[enb_mod_idP].Info.UE_list[ue_mod_idP]);
#if defined(ENABLE_USE_MME)
rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ(enb_mod_idP, ue_mod_idP, S1AP_CAUSE_RADIO_NETWORK, 0); // ue_mod_idP ??? or ???
rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ(enb_mod_idP, ue_mod_idP, S1AP_CAUSE_RADIO_NETWORK, 21); // send cause 21: connection with ue lost
/* From 3GPP 36300v10 p129 : 19.2.2.2.2 S1 UE Context Release Request (eNB triggered)
* If the E-UTRAN internal reason is a radio link failure detected in the eNB, the eNB shall wait a sufficient time before
* triggering the S1 UE Context Release Request procedure
......@@ -570,6 +570,7 @@ rrc_eNB_free_UE_index(
#endif
eNB_rrc_inst[enb_mod_idP].Info.UE[ue_mod_idP].Status = RRC_IDLE;
eNB_rrc_inst[enb_mod_idP].Info.UE_list[ue_mod_idP] = 0;
eNB_rrc_inst[enb_mod_idP].Info.UE[ue_mod_idP].eNB_ue_s1ap_id = 0;
ctxt.enb_module_id = enb_mod_idP;
ctxt.ue_module_id = ue_mod_idP;
......@@ -3001,7 +3002,7 @@ int rrc_eNB_decode_ccch(
//CONFIG SRB2 (DCCHs, ONE per User) //meas && lchan Cfg
//eNB_rrc_inst[enb_mod_idP].Info.Dtch_bd_config[ue_mod_idP].Status=NEED_RADIO_CONFIG;
//eNB_rrc_inst[enb_mod_idP].Info.Dtch_bd_config[ue_mod_idP].Next_eNBeck_frame=Rrc_xface->Frame_index+1;
eNB_rrc_inst[ue_mod_id].Info.Nb_ue++;
eNB_rrc_inst[enb_mod_idP].Info.Nb_ue++;
#ifndef NO_RRM
send_msg(&S_rrc, msg_rrc_MR_attach_ind(enb_mod_idP, Mac_id));
......@@ -3460,8 +3461,9 @@ void *rrc_enb_task(
break;
case GTPV1U_ENB_DELETE_TUNNEL_RESP:
LOG_I(RRC, "[eNB %d] Received message %s, not processed because procedure not synched\n",
instance, msg_name_p);
/* Nothing to do. Apparently everything is done in S1AP processing */
//LOG_I(RRC, "[eNB %d] Received message %s, not processed because procedure not synched\n",
//instance, msg_name_p);
break;
# endif
......
......@@ -859,10 +859,12 @@ int rrc_eNB_process_S1AP_UE_CONTEXT_RELEASE_COMMAND (MessageDef *msg_p, const ch
}
else {
rrc_eNB_generate_RRCConnectionRelease(instance, 0 /*frame*/, ue_index);
/*
LOG_W(RRC,
"[eNB %d] In S1AP_UE_CONTEXT_RELEASE_COMMAND: TODO call rrc_eNB_connection_release for eNB %d\n",
instance,
eNB_ue_s1ap_id);
*/
{
int e_rab;
int mod_id = 0;
......
......@@ -208,6 +208,7 @@ const char* eurecomFunctionsNames[] = {
"macxface_ue_get_sr",
"ue_send_mch_sdu",
"ue_synch",
/*RLC signals */
"rlc_data_req",
......
......@@ -211,6 +211,7 @@ get_free_mem_block (uint16_t sizeP)
#endif
} while (pool_selected++ < 12);
display_mem_load();
mac_xface->macphy_exit("[MEM_MNGT][ERROR][FATAL] get_free_mem_block failed");
return NULL;
};
......
......@@ -844,7 +844,7 @@ void *l2l1_task(void *arg)
result = itti_free (ITTI_MSG_ORIGIN_ID(message_p), message_p);
AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
} while(1);
} while(!oai_exit);
return NULL;
}
......@@ -1769,7 +1769,7 @@ static void get_options (int argc, char **argv) {
// char line[1000];
// int l;
int k,i;//,j,k;
#ifdef USRP
#if defined(USRP) || defined(CPRIGW)
int clock_src;
#endif
int CC_id;
......@@ -1953,7 +1953,7 @@ static void get_options (int argc, char **argv) {
}
break;
case 's':
#ifdef USRP
#if defined(USRP) || defined(CPRIGW)
clock_src = atoi(optarg);
if (clock_src == 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment