[sr-dev] git:master:94385af9: dispatcher: fixed the conflict in the function names and api

Daniel-Constantin Mierla miconda at gmail.com
Fri Jun 15 13:34:37 CEST 2018


Module: kamailio
Branch: master
Commit: 94385af9143e4b320f05dad501ccb5c446b5048b
URL: https://github.com/kamailio/kamailio/commit/94385af9143e4b320f05dad501ccb5c446b5048b

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2018-06-15T13:33:45+02:00

dispatcher: fixed the conflict in the function names and api

---

Modified: src/modules/dispatcher/dispatch.c

---

Diff:  https://github.com/kamailio/kamailio/commit/94385af9143e4b320f05dad501ccb5c446b5048b.diff
Patch: https://github.com/kamailio/kamailio/commit/94385af9143e4b320f05dad501ccb5c446b5048b.patch

---

diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c
index 18e4f51bc3..f5707c11e2 100644
--- a/src/modules/dispatcher/dispatch.c
+++ b/src/modules/dispatcher/dispatch.c
@@ -1663,7 +1663,7 @@ int ds_load_unset(struct sip_msg *msg)
 /**
  *
  */
-static inline int ds_update_dst(
+static inline int ds_push_dst(
 		struct sip_msg *msg, str *uri, struct socket_info *sock, int mode)
 {
 	struct action act;
@@ -2065,7 +2065,7 @@ int ds_select_dst_limit(
 	hash = i;
 
 	if(mode!=DS_SETOP_XAVP) {
-		if(ds_update_dst(msg, &idx->dlist[hash].uri, idx->dlist[hash].sock,
+		if(ds_push_dst(msg, &idx->dlist[hash].uri, idx->dlist[hash].sock,
 					mode) != 0) {
 			LM_ERR("cannot set next hop address with: %.*s\n",
 					idx->dlist[hash].uri.len, idx->dlist[hash].uri.s);
@@ -2208,7 +2208,7 @@ int ds_update_dst(struct sip_msg *msg, int upos, int mode)
 		return -1;
 	}
 
-	if(ds_update_dst(msg, &lxavp->val.v.s, sock, mode) != 0) {
+	if(ds_push_dst(msg, &lxavp->val.v.s, sock, mode) != 0) {
 		LM_ERR("cannot set dst addr: %.*s\n", lxavp->val.v.s.len,
 				lxavp->val.v.s.s);
 		return -1;
@@ -3053,6 +3053,11 @@ void ds_ht_timer(unsigned int ticks, void *param)
 	return;
 }
 
+int ds_next_dst_api(sip_msg_t *msg, int mode)
+{
+	return ds_update_dst(msg, DS_USE_NEXT, mode);
+}
+
 int bind_dispatcher(dispatcher_api_t *api)
 {
 	if(!api) {
@@ -3060,7 +3065,7 @@ int bind_dispatcher(dispatcher_api_t *api)
 		return -1;
 	}
 	api->select = ds_select_dst;
-	api->next = ds_next_dst;
+	api->next = ds_next_dst_api;
 	api->mark = ds_mark_dst;
 	api->is_from = ds_is_from_list;
 	return 0;




More information about the sr-dev mailing list