Module: kamailio
Branch: master
Commit: 7e22636bb2797f6ed9cac677678a7a1bfc4f2537
URL: 
https://github.com/kamailio/kamailio/commit/7e22636bb2797f6ed9cac677678a7a1bfc4f2537

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2024-02-23T12:53:39+01:00

dispatcher: rename interal define to reflect better is a mix of matching

- rather than a full address matching

---

Modified: src/modules/dispatcher/dispatch.c
Modified: src/modules/dispatcher/dispatch.h

---

Diff:  
https://github.com/kamailio/kamailio/commit/7e22636bb2797f6ed9cac677678a7a1bfc4f2537.diff
Patch: 
https://github.com/kamailio/kamailio/commit/7e22636bb2797f6ed9cac677678a7a1bfc4f2537.patch

---

diff --git a/src/modules/dispatcher/dispatch.c 
b/src/modules/dispatcher/dispatch.c
index 0a609075a5e..9e27f998c25 100644
--- a/src/modules/dispatcher/dispatch.c
+++ b/src/modules/dispatcher/dispatch.c
@@ -3605,9 +3605,9 @@ int ds_is_addr_from_set(sip_msg_t *_m, struct ip_addr 
*pipaddr,
                if(ip_addr_cmp(pipaddr, ipa)
                                && ((mode & DS_MATCH_NOPORT) || 
node->dlist[j].port == 0
                                                || tport == node->dlist[j].port
-                                               || (mode & 
DS_MATCH_TRY_FULLADDRSOCK))
+                                               || (mode & 
DS_MATCH_MIXSOCKPRPORT))
                                && ((mode & DS_MATCH_NOPROTO) || tproto == 
node->dlist[j].proto
-                                               || (mode & 
DS_MATCH_TRY_FULLADDRSOCK))
+                                               || (mode & 
DS_MATCH_MIXSOCKPRPORT))
                                && (((mode & DS_MATCH_ACTIVE)
                                                        && 
!ds_skip_dst(node->dlist[j].flags))
                                                || !(mode & DS_MATCH_ACTIVE))
@@ -3615,7 +3615,7 @@ int ds_is_addr_from_set(sip_msg_t *_m, struct ip_addr 
*pipaddr,
                                                        && node->dlist[j].sock 
== _m->rcv.bind_address)
                                                || !node->dlist[j].sock || 
!(mode & DS_MATCH_SOCKET))) {
 
-                       if(mode & DS_MATCH_TRY_FULLADDRSOCK) {
+                       if(mode & DS_MATCH_MIXSOCKPRPORT) {
                                node_strictness = DS_MATCHED_ADDR;
                                if(node->dlist[j].port) {
                                        if(tport != node->dlist[j].port)
@@ -3738,7 +3738,7 @@ int ds_is_addr_from_list(sip_msg_t *_m, int group, str 
*uri, int mode)
        }
 
 
-       if(mode & DS_MATCH_TRY_FULLADDRSOCK) {
+       if(mode & DS_MATCH_MIXSOCKPRPORT) {
                ds_strictness = 0;
                ds_strictest_node = NULL;
        }
@@ -3753,7 +3753,7 @@ int ds_is_addr_from_list(sip_msg_t *_m, int group, str 
*uri, int mode)
                }
        }
 
-       if(rc == -1 && mode & DS_MATCH_TRY_FULLADDRSOCK && ds_strictest_node) {
+       if(rc == -1 && (mode & DS_MATCH_MIXSOCKPRPORT) && ds_strictest_node) {
                rc = ds_set_vars(
                                _m, ds_strictest_node, ds_strictest_idx, group 
== -1 ? 1 : 0);
        }
diff --git a/src/modules/dispatcher/dispatch.h 
b/src/modules/dispatcher/dispatch.h
index a628a426a61..a887c555932 100644
--- a/src/modules/dispatcher/dispatch.h
+++ b/src/modules/dispatcher/dispatch.h
@@ -60,7 +60,7 @@
 #define DS_MATCH_NOPROTO               2
 #define DS_MATCH_ACTIVE                        4
 #define DS_MATCH_SOCKET                        8
-#define DS_MATCH_TRY_FULLADDRSOCK      16
+#define DS_MATCH_MIXSOCKPRPORT 16
 
 #define DS_SETOP_DSTURI                0
 #define DS_SETOP_RURI          1

_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org

Reply via email to