Commit 496e81ef authored by Cedric Roux's avatar Cedric Roux
Browse files

- Fix dependencies in S1AP Makefile

- Added xer print for initial context setup request message

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4449 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 73df1c88
......@@ -84,15 +84,13 @@ $(S1AP_OBJDIR)/s1ap_asn1regen.stamp: $(ASN1DIR)/$(ASN1RELDIR)/S1AP-CommonDataTyp
(cd $(ASN1MESSAGESDIR) && asn1c -fhave_native64 -gen-PER $^)
echo Timestamp > $@
.INTERMEDIATE = $(S1AP_OBJDIR)/s1ap_ieregen.stamp $(S1AP_OBJDIR)/s1ap_asn1regen.stamp
libs1ap.a: $(S1AP_OBJDIR)/s1ap_ieregen.stamp $(S1AP_OBJDIR)/s1ap_asn1regen.stamp $(libs1ap_OBJECTS)
@echo Creating S1AP archive
@$(AR) rcs $@ $(libs1ap_OBJECTS)
clean:
@$(RM_F_V) $(libs1ap_OBJECTS)
@$(RM_F_V) .*.d
@$(RM_F_V) *.d
@$(RM_F_V) $(addprefix MESSAGES/, $(S1AP_ASN_MODULE_SOURCES))
@$(RM_F_V) $(addprefix MESSAGES/, $(S1AP_ASN_MODULE_SOURCES_R9))
@$(RM_F_V) $(addprefix MESSAGES/, $(S1AP_ASN_MODULE_SOURCES_R10))
......
......@@ -48,14 +48,22 @@
static int s1ap_eNB_decode_initiating_message(s1ap_message *message,
S1ap_InitiatingMessage_t *initiating_p)
{
char message_string[10000];
int ret = -1;
MessageDef *message_p;
char *message_string = NULL;
size_t message_string_size;
DevAssert(initiating_p != NULL);
message_string = calloc(10000, sizeof(char));
s1ap_string_total_size = 0;
message->procedureCode = initiating_p->procedureCode;
message->criticality = initiating_p->criticality;
switch(initiating_p->procedureCode) {
switch(initiating_p->procedureCode)
{
case S1ap_ProcedureCode_id_downlinkNASTransport:
ret = s1ap_decode_s1ap_downlinknastransporties(
&message->msg.s1ap_DownlinkNASTransportIEs, &initiating_p->value);
......@@ -63,14 +71,26 @@ static int s1ap_eNB_decode_initiating_message(s1ap_message *message,
break;
case S1ap_ProcedureCode_id_InitialContextSetup:
return s1ap_decode_s1ap_initialcontextsetuprequesties(
ret = s1ap_decode_s1ap_initialcontextsetuprequesties(
&message->msg.s1ap_InitialContextSetupRequestIEs, &initiating_p->value);
s1ap_xer_print_s1ap_initialcontextsetuprequest(s1ap_xer__print2sp, message_string, message);
break;
default:
S1AP_DEBUG("Unknown procedure ID (%d) for initiating message\n",
S1AP_ERROR("Unknown procedure ID (%d) for initiating message\n",
(int)initiating_p->procedureCode);
break;
return -1;
}
message_string_size = strlen(message_string);
message_p = itti_alloc_new_message_sized(TASK_S1AP, GENERIC_LOG, message_string_size);
memcpy(&message_p->msg.generic_log, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
free(message_string);
return ret;
}
......@@ -84,18 +104,23 @@ static int s1ap_eNB_decode_successful_outcome(s1ap_message *message,
DevAssert(successfullOutcome_p != NULL);
message_string = malloc(sizeof(char) * 10000);
s1ap_string_total_size = 0;
message->procedureCode = successfullOutcome_p->procedureCode;
message->criticality = successfullOutcome_p->criticality;
switch(successfullOutcome_p->procedureCode) {
switch(successfullOutcome_p->procedureCode)
{
case S1ap_ProcedureCode_id_S1Setup:
message_string = malloc(sizeof(char) * 10000);
ret = s1ap_decode_s1ap_s1setupresponseies(
&message->msg.s1ap_S1SetupResponseIEs, &successfullOutcome_p->value);
s1ap_xer_print_s1ap_s1setupresponse(s1ap_xer__print2sp, message_string, message);
break;
default:
S1AP_DEBUG("Unknown procedure ID (%d) for successfull outcome message\n",
S1AP_ERROR("Unknown procedure ID (%d) for successfull outcome message\n",
(int)successfullOutcome_p->procedureCode);
return -1;
}
......@@ -127,7 +152,7 @@ static int s1ap_eNB_decode_unsuccessful_outcome(s1ap_message *message,
&message->msg.s1ap_S1SetupFailureIEs, &unSuccessfullOutcome_p->value);
default:
S1AP_DEBUG("Unknown procedure ID (%d) for unsuccessfull outcome message\n",
S1AP_ERROR("Unknown procedure ID (%d) for unsuccessfull outcome message\n",
(int)unSuccessfullOutcome_p->procedureCode);
break;
}
......
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