iterator.c: auto-seeking: use packet messages's clock snapshots
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 19 Feb 2019 14:40:16 +0000 (09:40 -0500)
committerFrancis Deslauriers <francis.deslauriers@efficios.com>
Thu, 2 May 2019 20:50:15 +0000 (20:50 +0000)
Consider the default clock snapshots of packet beginning and end
messages in get_message_ns_from_origin() for auto-seeking.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
lib/graph/iterator.c

index 094447b6f1f1a28d359616916ce8fc949e8e4c37..ddfe417cf607841490d41b5f1d3cb04046a5d04d 100644 (file)
@@ -987,8 +987,8 @@ int get_message_ns_from_origin(const struct bt_message *msg,
 
                clk_snapshot = event_msg->default_cs;
                BT_ASSERT_PRE(clk_snapshot,
-                       "Event has no default clock snapshot: %!+e",
-                       event_msg->event);
+                       "Event message has no default clock snapshot: %!+n",
+                       event_msg);
                break;
        }
        case BT_MESSAGE_TYPE_INACTIVITY:
@@ -1002,8 +1002,16 @@ int get_message_ns_from_origin(const struct bt_message *msg,
        }
        case BT_MESSAGE_TYPE_PACKET_BEGINNING:
        case BT_MESSAGE_TYPE_PACKET_END:
-               /* Ignore */
-               goto end;
+       {
+               const struct bt_message_packet *packet_msg =
+                       (const void *) msg;
+
+               clk_snapshot = packet_msg->default_cs;
+               BT_ASSERT_PRE(clk_snapshot,
+                       "Packet message has no default clock snapshot: %!+n",
+                       packet_msg);
+               break;
+       }
        case BT_MESSAGE_TYPE_DISCARDED_EVENTS:
        case BT_MESSAGE_TYPE_DISCARDED_PACKETS:
        {
This page took 0.025567 seconds and 4 git commands to generate.