[sr-dev] git:master:e5b7d9f0: Revert "modules/cdp: CER/CEA retry if send/receive FD disappeared"

jaybeepee jason.penton at gmail.com
Mon Jul 6 11:12:17 CEST 2015


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

Author: jaybeepee <jason.penton at gmail.com>
Committer: jaybeepee <jason.penton at gmail.com>
Date: 2015-07-06T11:11:45+02:00

Revert "modules/cdp: CER/CEA retry if send/receive FD disappeared"

This reverts commit 867a29d80aebaddaa0e1c960b9e1d459b7a9fb4d.

---

Modified: modules/cdp/peerstatemachine.c

---

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

---

diff --git a/modules/cdp/peerstatemachine.c b/modules/cdp/peerstatemachine.c
index f7ec548..6434ae4 100644
--- a/modules/cdp/peerstatemachine.c
+++ b/modules/cdp/peerstatemachine.c
@@ -615,11 +615,9 @@ static inline void Snd_CE_add_applications(AAAMessage *msg,peer *p)
  */
 void I_Snd_CER(peer *p)
 {
-        int retries = 3;
 	AAAMessage *cer=0;
 //	AAA_AVP *avp;
 	unsigned long ip;
-        peer_event_t next_event;
 	union {
 		struct sockaddr addr;
 		struct sockaddr_in in;
@@ -633,19 +631,8 @@ void I_Snd_CER(peer *p)
 	cer->hopbyhopId = next_hopbyhop();
 	cer->endtoendId = next_endtoend();
 	addrlen = sizeof(addr_u);
-
-retry:  if (getsockname(p->I_sock,&(addr_u.addr), &addrlen) == -1) { 
+	if (getsockname(p->I_sock,&(addr_u.addr), &addrlen) == -1) { 
 		LM_ERR("I_Snd_CER(): Error on finding local host address > %s\n",strerror(errno));
-                //try and create a new FD
-                if (retries > 0) {
-                    p->state = Wait_Conn_Ack;
-                    next_event = I_Snd_Conn_Req(p);
-                    if (next_event==I_Rcv_Conn_NAck) {
-                        sm_process(p, next_event, 0, 1, p->I_sock);
-                        retries--;
-                        goto retry;
-                    }
-                }
 	}else{
 		switch(addr_u.addr.sa_family){
 			case AF_INET:
@@ -1019,10 +1006,8 @@ int Process_CER(peer *p,AAAMessage *cer)
  */
 void Snd_CEA(peer *p,AAAMessage *cer,int result_code,int sock)
 {
-	int retries=3;
 	AAAMessage *cea;
 	unsigned int ip;
-	peer_event_t next_event;
 	union {
 		struct sockaddr addr;
 		struct sockaddr_in in;
@@ -1035,18 +1020,8 @@ void Snd_CEA(peer *p,AAAMessage *cer,int result_code,int sock)
 	if (!cea) goto done;
 	
 	addrlen = sizeof(addr_u);
-retry:	if (getsockname(sock, &(addr_u.addr), &addrlen) == -1) { 
+	if (getsockname(sock, &(addr_u.addr), &addrlen) == -1) { 
 		LM_ERR("Snd_CEA(): Error on finding local host address > %s\n",strerror(errno));
-		//try and create a new FD
-                if (retries > 0) {
-                    p->state = Wait_Conn_Ack;
-                    next_event = I_Snd_Conn_Req(p);
-                    if (next_event==I_Rcv_Conn_NAck) {
-                        sm_process(p, next_event, 0, 1, p->I_sock);
-                        retries--;
-                        goto retry;
-                    } 
-                }
 	}else{
 		switch(addr_u.addr.sa_family){
 			case AF_INET:




More information about the sr-dev mailing list