Commit b14a2212 authored by gauthier's avatar gauthier

Correct timming issues

parent ea7c5d5e
...@@ -921,7 +921,6 @@ int et_play_scenario(et_scenario_t* const scenario, const struct shift_packet_s ...@@ -921,7 +921,6 @@ int et_play_scenario(et_scenario_t* const scenario, const struct shift_packet_s
shift = shift->next; shift = shift->next;
} }
// now recompute time_relative_to_last_received_packet, time_relative_to_last_sent_packet // now recompute time_relative_to_last_received_packet, time_relative_to_last_sent_packet
if (shifts) {
packet = scenario->list_packet; packet = scenario->list_packet;
while (packet) { while (packet) {
if (first_packet > 0) { if (first_packet > 0) {
...@@ -973,7 +972,6 @@ int et_play_scenario(et_scenario_t* const scenario, const struct shift_packet_s ...@@ -973,7 +972,6 @@ int et_play_scenario(et_scenario_t* const scenario, const struct shift_packet_s
} }
packet = packet->next; packet = packet->next;
} }
}
et_display_scenario(scenario); et_display_scenario(scenario);
// create SCTP ITTI task: same as eNB code // create SCTP ITTI task: same as eNB code
......
...@@ -135,7 +135,7 @@ void et_scenario_schedule_tx_packet(et_packet_t * packet) ...@@ -135,7 +135,7 @@ void et_scenario_schedule_tx_packet(et_packet_t * packet)
} else { } else {
LOG_D(ENB_APP, "last_packet_was_tx\n"); LOG_D(ENB_APP, "last_packet_was_tx\n");
we_are_too_late = timeval_subtract(&offset,&offset_last_tx_packet,&packet->time_relative_to_last_sent_packet); we_are_too_late = timeval_subtract(&offset,&offset_last_tx_packet,&packet->time_relative_to_last_sent_packet);
LOG_D(ENB_APP, "we_are_too_early=%d, offset=%ld.%06d\n", we_are_too_late, offset.tv_sec, offset.tv_usec); LOG_D(ENB_APP, "we_are_too_late=%d, offset=%ld.%06d\n", we_are_too_late, offset.tv_sec, offset.tv_usec);
} }
if ((0 == we_are_too_late) && (0 == g_max_speed)){ if ((0 == we_are_too_late) && (0 == g_max_speed)){
// set timer // set timer
......
...@@ -496,8 +496,9 @@ void update_xpath_node_mme_ue_s1ap_id(et_s1ap_t * const s1ap, xmlNode *node, con ...@@ -496,8 +496,9 @@ void update_xpath_node_mme_ue_s1ap_id(et_s1ap_t * const s1ap, xmlNode *node, con
const xmlChar showname[64]; const xmlChar showname[64];
int ret = 0; int ret = 0;
int pos2 = 0; int pos2 = 0;
char val = NULL; unsigned long int uli = 0;
char hex[3] = {0,0,0};; char hex[3] = {0,0,0};
char *end_ptr = NULL;
size = strtoul((const char *)xml_char, NULL, 0); size = strtoul((const char *)xml_char, NULL, 0);
xmlFree(xml_char); xmlFree(xml_char);
...@@ -518,10 +519,11 @@ void update_xpath_node_mme_ue_s1ap_id(et_s1ap_t * const s1ap, xmlNode *node, con ...@@ -518,10 +519,11 @@ void update_xpath_node_mme_ue_s1ap_id(et_s1ap_t * const s1ap, xmlNode *node, con
do { do {
hex[0] = value_h[pos2++]; hex[0] = value_h[pos2++];
hex[1] = value_h[pos2++]; hex[1] = value_h[pos2++];
hex[2] = 0; hex[2] = '\0';
val = (unsigned char)strtoul(hex, NULL, 16); end_ptr = hex;
AssertFatal(errno != 0, "Conversion of hexstring %s failed", hex); uli = strtoul(hex, &end_ptr, 16);
s1ap->binary_stream[pos++] = val; AssertFatal((uli != ULONG_MAX) && (end_ptr != NULL) && (*end_ptr == '\0'), "Conversion of hexstring %s failed returned %ld errno %d", hex, uli, errno);
s1ap->binary_stream[pos++] = (unsigned char)uli;
} while (pos2 < (2*5)); } while (pos2 < (2*5));
// update ASN1 // update ASN1
et_decode_s1ap(s1ap); et_decode_s1ap(s1ap);
......
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