Module: sip-router
Branch: 3.1
Commit: fba61d177eb87879925a44a1b1ad0ea51864da57
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=fba61d1…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Tue Jun 7 23:19:18 2011 +0200
core: IPv6 addr enclosed in square brackets for process descripton
- UDP and SCTP listeners will have the IPv6 address in between square
brackets inside the description string
(cherry picked from commit 5629f449af98134c05c0679588de906a414364ab)
---
main.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/main.c b/main.c
index fcc25ae..085420b 100644
--- a/main.c
+++ b/main.c
@@ -1537,9 +1537,15 @@ int main_loop()
/* udp processes */
for(si=udp_listen; si; si=si->next){
for(i=0;i<children_no;i++){
- snprintf(si_desc, MAX_PT_DESC, "udp receiver child=%d "
+ if(si->address.af==AF_INET6) {
+ snprintf(si_desc, MAX_PT_DESC, "udp receiver child=%d "
+ "sock=[%s]:%s",
+ i, si->name.s, si->port_no_str.s);
+ } else {
+ snprintf(si_desc, MAX_PT_DESC, "udp receiver child=%d "
"sock=%s:%s",
i, si->name.s, si->port_no_str.s);
+ }
child_rank++;
pid = fork_process(child_rank, si_desc, 1);
if (pid<0){
@@ -1562,9 +1568,15 @@ int main_loop()
if (!sctp_disable){
for(si=sctp_listen; si; si=si->next){
for(i=0;i<sctp_children_no;i++){
- snprintf(si_desc, MAX_PT_DESC, "sctp receiver child=%d "
+ if(si->address.af==AF_INET6) {
+ snprintf(si_desc, MAX_PT_DESC, "sctp receiver child=%d "
+ "sock=[%s]:%s",
+ i, si->name.s, si->port_no_str.s);
+ } else {
+ snprintf(si_desc, MAX_PT_DESC, "sctp receiver child=%d "
"sock=%s:%s",
i, si->name.s, si->port_no_str.s);
+ }
child_rank++;
pid = fork_process(child_rank, si_desc, 1);
if (pid<0){