[sr-dev] git:ser_core_cvs: core: startup socket list fix

Andrei Pelinescu-Onciul andrei at iptel.org
Fri Jul 17 17:43:28 CEST 2009


Module: sip-router
Branch: ser_core_cvs
Commit: 786670ec30e349f79a4237a5bdcd0edc513ac234
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=786670ec30e349f79a4237a5bdcd0edc513ac234

Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei at iptel.org>
Date:   Wed Jul 15 00:11:40 2009 +0000

core: startup socket list fix

Fix crash on startup when dealing with consecutive duplicate
socket  ("listen") addresses.

---

 socket_info.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/socket_info.c b/socket_info.c
index 1b260dd..46a57f5 100644
--- a/socket_info.c
+++ b/socket_info.c
@@ -1077,7 +1077,9 @@ static int fix_socket_list(struct socket_info **list, int* type_flags)
 					)
 					add_alias(del_si->name.s, del_si->name.len,
 								l->port_no, l->proto);
-						
+				/* make sure next_si doesn't point to del_si */
+				if (del_si==next_si)
+					next_si=next_si->next;
 				/* remove del_si*/
 				sock_listrm(list, del_si);
 				free_sock_info(del_si);




More information about the sr-dev mailing list