Module: sip-router
Branch: master
Commit: 5629f449af98134c05c0679588de906a414364ab
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5629f44…
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
---
main.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/main.c b/main.c
index d525fb4..22ed613 100644
--- a/main.c
+++ b/main.c
@@ -1541,9 +1541,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){
@@ -1566,9 +1572,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){