fixed issue with the liblte_s1ap transparent container packing

master
Francisco Paisana 5 years ago
parent 7885b5b9ee
commit c7f11e5690

@ -8232,6 +8232,8 @@ LIBLTE_ERROR_ENUM liblte_s1ap_pack_targetenb_tosourceenb_transparentcontainer(
liblte_value_2_bits(ie->iE_Extensions_present ? 1 : 0, ptr, 1);
liblte_align_up_zero(ptr, 8);
if (liblte_s1ap_pack_rrc_container(&ie->rRC_Container, ptr) != LIBLTE_SUCCESS) {
return LIBLTE_ERROR_ENCODE_FAIL;
}
@ -8262,6 +8264,8 @@ LIBLTE_ERROR_ENUM liblte_s1ap_unpack_targetenb_tosourceenb_transparentcontainer(
ie->iE_Extensions_present = liblte_bits_2_value(ptr, 1);
liblte_align_up_zero(ptr, 8);
if (liblte_s1ap_unpack_rrc_container(ptr, &ie->rRC_Container) != LIBLTE_SUCCESS) {
return LIBLTE_ERROR_DECODE_FAIL;
}

@ -437,7 +437,7 @@ public:
ssize_t n_recv = recvfrom(fd, pdu->msg, pdu->get_tailroom(), 0, (struct sockaddr*)&from, &fromlen);
if (n_recv == -1 and errno != EAGAIN) {
log_h->error("Error reading from SCTP socket: %s\n", strerror(errno));
log_h->error("Error reading from socket: %s\n", strerror(errno));
return true;
}
if (n_recv == -1 and errno == EAGAIN) {

@ -929,7 +929,8 @@ srslte::proc_outcome_t rrc::ue::rrc_mobility::sourceenb_ho_proc_t::react(ho_prep
{
asn1::bit_ref bref(e.rrc_container->msg, e.rrc_container->N_bytes);
if (rrchocmd.unpack(bref) != asn1::SRSASN_SUCCESS) {
procError("Unpacking of RRC HO Command was unsuccessful\n");
procError("Unpacking of RRC HOCommand was unsuccessful\n");
parent->rrc_log->error_hex(e.rrc_container->msg, e.rrc_container->N_bytes, "Received container:\n");
return srslte::proc_outcome_t::error;
}
}

@ -84,6 +84,7 @@ srslte::proc_outcome_t s1ap::ue::ho_prep_proc_t::react(const LIBLTE_S1AP_MESSAGE
/**
* TS 36.413 - Section 8.4.1.2 - HandoverPreparation Successful Operation
* Description: MME returns back an HandoverCommand to the SeNB
*/
srslte::proc_outcome_t s1ap::ue::ho_prep_proc_t::react(LIBLTE_S1AP_MESSAGE_HANDOVERCOMMAND_STRUCT& msg)
{
@ -117,6 +118,7 @@ srslte::proc_outcome_t s1ap::ue::ho_prep_proc_t::react(LIBLTE_S1AP_MESSAGE_HANDO
LIBLTE_S1AP_TARGETENB_TOSOURCEENB_TRANSPARENTCONTAINER_STRUCT container;
liblte_unpack(
&msg.Target_ToSource_TransparentContainer.buffer[0], msg.Target_ToSource_TransparentContainer.n_octets, bit_ptr);
bit_msg.N_bits = bit_ptr - &bit_msg.msg[0];
liblte_s1ap_unpack_targetenb_tosourceenb_transparentcontainer(&bit_ptr, &container);
if (container.iE_Extensions_present or container.ext) {
procWarning("Not handling extensions\n");
@ -129,6 +131,7 @@ srslte::proc_outcome_t s1ap::ue::ho_prep_proc_t::react(LIBLTE_S1AP_MESSAGE_HANDO
return srslte::proc_outcome_t::error;
}
memcpy(rrc_container->msg, container.rRC_Container.buffer, container.rRC_Container.n_octets);
rrc_container->N_bytes = container.rRC_Container.n_octets;
return srslte::proc_outcome_t::success;
}
@ -239,7 +242,7 @@ bool s1ap::init(s1ap_args_t args_,
mme_connect_timer.set(10000, mme_connect_run);
// Setup S1Setup timeout
s1setup_timeout = timers->get_unique_timer();
uint32_t s1setup_timeout_val = 1000;
uint32_t s1setup_timeout_val = 5000;
s1setup_timeout.set(s1setup_timeout_val, [this](uint32_t tid) {
s1_setup_proc_t::s1setupresult res;
res.success = false;

Loading…
Cancel
Save