From 5d0875b6a12e8af6e3473eb40fccccc93475e8ba Mon Sep 17 00:00:00 2001 From: mvglasow Date: Wed, 7 Aug 2019 22:43:00 +0200 Subject: Refactor:traffic:Make sanity check happy Signed-off-by: mvglasow --- navit/traffic.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/navit/traffic.c b/navit/traffic.c index 47d4dd075..23a4e8572 100644 --- a/navit/traffic.c +++ b/navit/traffic.c @@ -3476,9 +3476,9 @@ static int traffic_message_restore_segments(struct traffic_message * this_, stru while (items && lengths) { item = (struct item *) curr_item->data; tm_item_add_message_data(item, this_->id, - traffic_get_item_speed(item, seg_data, INT_MAX), // TODO use segment maxspeed if set - traffic_get_item_delay(seg_data->delay, (int) curr_length->data, loc_len), - NULL, route); + traffic_get_item_speed(item, seg_data, INT_MAX), // TODO use segment maxspeed if set + traffic_get_item_delay(seg_data->delay, (int) curr_length->data, loc_len), + NULL, route); this_->priv->items[i] = item; /* move on to next item */ curr_item = g_list_next(curr_item); @@ -4195,7 +4195,10 @@ static int traffic_process_messages_int(struct traffic * this_, int flags) { dbg(lvl_debug, "*****checkpoint PROCESS-4, need to find matching segments"); if (message->location->priv->txt_data) { traffic_message_restore_segments(message, this_->shared->ms, - message->location->priv->txt_data, this_->shared->map, this_->shared->rt); + message->location->priv->txt_data, + this_->shared->map, this_->shared->rt); + } else { + dbg(lvl_debug, "location has no txt_data, nothing to restore"); } /* * We need to find matching segments from scratch. -- cgit v1.2.1