[calls] sip: Avoid g_error for non-fatal issues



commit 2520a9a5556411ef7fa726f6ea688063140bf5b4
Author: Evangelos Ribeiro Tzaras <devrtz fortysixandtwo eu>
Date:   Wed Aug 25 20:36:01 2021 +0200

    sip: Avoid g_error for non-fatal issues
    
    The media pipeline acting up does not warrant crashing the application.

 plugins/sip/calls-sip-media-pipeline.c | 8 ++++----
 plugins/sip/calls-sip-provider.c       | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/plugins/sip/calls-sip-media-pipeline.c b/plugins/sip/calls-sip-media-pipeline.c
index 723f3879..2ef180a8 100644
--- a/plugins/sip/calls-sip-media-pipeline.c
+++ b/plugins/sip/calls-sip-media-pipeline.c
@@ -121,7 +121,7 @@ on_pad_added (GstElement *rtpbin,
 
   sinkpad = gst_element_get_static_pad (depayloader, "sink");
   if (gst_pad_link (srcpad, sinkpad) != GST_PAD_LINK_OK)
-    g_error ("Failed to link rtpbin to depayloader");
+    g_warning ("Failed to link rtpbin to depayloader");
 
   gst_object_unref (sinkpad);
 }
@@ -141,7 +141,7 @@ on_bus_message (GstBus     *bus,
       g_autofree char *msg = NULL;
 
       gst_message_parse_error (message, &error, &msg);
-      g_error ("Error: %s", msg);
+      g_warning ("Error on the message bus: %s (%s)", error->message, msg);
       break;
     }
 
@@ -151,7 +151,7 @@ on_bus_message (GstBus     *bus,
       g_autofree char *msg = NULL;
 
       gst_message_parse_warning (message, &error, &msg);
-      g_warning ("Warning: %s", msg);
+      g_warning ("Warning on the message bus: %s (%s)", error->message, msg);
       break;
     }
 
@@ -680,7 +680,7 @@ calls_sip_media_pipeline_new (MediaCodecInfo *codec)
                              "codec", codec,
                              NULL);
   if (pipeline == NULL)
-    g_error ("Media pipeline could not be initialized: %s", error->message);
+    g_warning ("Media pipeline could not be initialized: %s", error->message);
 
   return pipeline;
 }
diff --git a/plugins/sip/calls-sip-provider.c b/plugins/sip/calls-sip-provider.c
index cece62d2..713cf530 100644
--- a/plugins/sip/calls-sip-provider.c
+++ b/plugins/sip/calls-sip-provider.c
@@ -375,7 +375,7 @@ calls_sip_provider_deinit_sip (CallsSipProvider *self)
     su_root_destroy (self->ctx->root);
 
     if (su_home_unref (self->ctx->home) != 1)
-      g_error ("Error in su_home_unref ()");
+      g_warning ("Error in su_home_unref ()");
   }
   g_clear_pointer (&self->ctx, g_free);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]