Browse code

core: update printing of socket lists to show the advertised address if set for the socket

- useful for diagnosing what is going on with advertised address
- Enhancement added by Hugh Waite @ Crocodile RCS

Peter Dunkley authored on 12/07/2012 20:44:45
Showing 1 changed files
... ...
@@ -2012,10 +2012,13 @@ void print_all_socket_lists()
2012 2012
 						si->name.s);
2013 2013
 				if (!si->flags & SI_IS_IP)
2014 2014
 					printf(" [%s]", si->address_str.s);
2015
-				printf( ":%s%s%s\n",
2015
+				printf( ":%s%s%s",
2016 2016
 						si->port_no_str.s, 
2017 2017
 						si->flags & SI_IS_MCAST ? " mcast" : "",
2018 2018
 						si->flags & SI_IS_MHOMED? " mhomed" : "");
2019
+				if (si->useinfo.name.s)
2020
+					printf(" advertise %s", si->useinfo.name.s);
2021
+				printf("\n");
2019 2022
 			}
2020 2023
 		}
2021 2024
 	}while((proto=next_proto(proto)));