@xkaraman commented on this pull request.


> +/**
+ *
+ */
+static int w_ptr_query(sip_msg_t *msg, char *ip, char *pv_name)
+{
+       str ip_address;
+       str name;
+
+       if(msg == NULL) {
+               LM_ERR("received null msg\n");
+               return -1;
+       }
+
+       if(fixup_get_svalue(msg, (gparam_t *)ip, &ip_address) < 0) {
+               LM_ERR("cannot get the IP address\n");
+               return -1;

Main reason i see for separating errors is for debugging purposes. 

Another thing, that might be good, would be to separate the failure over bad 
input and successful call with no hostname associated 
([getnameinfo](https://man7.org/linux/man-pages/man3/getnameinfo.3.html)). Do 
you think this makes sense to separate and document it?

Other than that, as you have said the code just want to know it had failed and 
not how.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3802#discussion_r1549316055
You are receiving this because you are subscribed to this thread.

Message ID: <kamailio/kamailio/pull/3802/review/1976115...@github.com>
_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org

Reply via email to