[farsight2/master] Check correctly for the right type of farsight error GstMessage (in test)

Olivier Crête olivier.crete at collabora.co.uk
Tue Dec 23 15:21:52 PST 2008


---
 tests/check/main/rtpconference.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/tests/check/main/rtpconference.c b/tests/check/main/rtpconference.c
index 01090b8..b560fdb 100644
--- a/tests/check/main/rtpconference.c
+++ b/tests/check/main/rtpconference.c
@@ -128,12 +128,17 @@ _bus_callback (GstBus *bus, GstMessage *message, gpointer user_data)
   switch (GST_MESSAGE_TYPE (message))
   {
     case GST_MESSAGE_ELEMENT:
-      if (gst_implements_interface_check (GST_MESSAGE_SRC (message),
-              FS_TYPE_CONFERENCE))
+      if (!strcmp (gst_structure_get_name (message->structure),
+                  "farsight-error"))
       {
         const GValue *errorvalue, *debugvalue;
         gint errno;
 
+        ts_fail_unless (
+            gst_implements_interface_check (GST_MESSAGE_SRC (message),
+                FS_TYPE_CONFERENCE),
+            "Received farsight-error from non-farsight element");
+
         gst_structure_get_int (message->structure, "error-no", &errno);
         errorvalue = gst_structure_get_value (message->structure, "error-msg");
         debugvalue = gst_structure_get_value (message->structure, "debug-msg");
-- 
1.5.6.5




More information about the farsight-commits mailing list