Module: kamailio
Branch: master
Commit: 87cfa9f3c5ae337dceb78654beb6fe4b00587993
URL: 
https://github.com/kamailio/kamailio/commit/87cfa9f3c5ae337dceb78654beb6fe4b00587993

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2025-05-16T10:39:33+02:00

pv_headers: compare the pvh_set_xavi() result with NULL

---

Modified: src/modules/pv_headers/pvh_func.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/87cfa9f3c5ae337dceb78654beb6fe4b00587993.diff
Patch: 
https://github.com/kamailio/kamailio/commit/87cfa9f3c5ae337dceb78654beb6fe4b00587993.patch

---

diff --git a/src/modules/pv_headers/pvh_func.c 
b/src/modules/pv_headers/pvh_func.c
index 1fe3d58f07c..5cbeb143113 100644
--- a/src/modules/pv_headers/pvh_func.c
+++ b/src/modules/pv_headers/pvh_func.c
@@ -113,20 +113,20 @@ int pvh_collect_headers(struct sip_msg *msg)
                                val_part.len = strlen(hvals[idx]);
                                if(pvh_set_xavi(msg, &_pvh_params.xavi_name, 
&name, &val_part,
                                                   SR_XTYPE_STR, 0, 1)
-                                               < 0)
+                                               == NULL)
                                        return -1;
                        }
                        continue;
                }
                if(pvh_set_xavi(
                                   msg, &_pvh_params.xavi_name, &name, &val, 
SR_XTYPE_STR, 0, 1)
-                               < 0)
+                               == NULL)
                        return -1;
        }
 
        if(pvh_set_xavi(msg, &_pvh_params.xavi_helper_xname, &xavi_helper_name,
                           &_pvh_params.xavi_name, SR_XTYPE_STR, 0, 0)
-                       < 0)
+                       == NULL)
                return -1;
 
        pvh_hdrs_set_collected(msg);

_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to