[calls] sip: origin: Warn instead of asserting in update_nua() on nua stack



commit 2df221c94ca5881ef2b3c07257589ab8289fcafd
Author: Evangelos Ribeiro Tzaras <devrtz fortysixandtwo eu>
Date:   Tue Aug 31 07:51:50 2021 +0200

    sip: origin: Warn instead of asserting in update_nua() on nua stack
    
    Crashing the application is overkill in this case.

 plugins/sip/calls-sip-origin.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/plugins/sip/calls-sip-origin.c b/plugins/sip/calls-sip-origin.c
index d3b0f6eb..744acb35 100644
--- a/plugins/sip/calls-sip-origin.c
+++ b/plugins/sip/calls-sip-origin.c
@@ -323,7 +323,10 @@ update_nua (CallsSipOrigin *self)
   g_autofree char *from_str = NULL;
 
   g_assert (CALLS_IS_SIP_ORIGIN (self));
-  g_assert (self->nua);
+  if (!self->nua) {
+    g_warning ("Cannot update nua stack, aborting");
+    return;
+  }
 
   self->protocol_prefix = get_protocol_prefix (self->transport_protocol);
 


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