Add the ability to bind listening sockets to addresses, and use this for the

/detach IPC socket.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@330 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
Kevin Easton
2013-08-15 14:05:15 +00:00
parent a394019490
commit 176be1cff2
2 changed files with 6 additions and 2 deletions

View File

@@ -466,7 +466,11 @@ int BX_connect_by_number(char *hostn, unsigned short *portnum, int service, int
memset(&name, 0, sizeof name);
name.sin_family = AF_INET;
name.sin_addr.s_addr = htonl(INADDR_ANY);
if (hostn)
inet_aton(hostn, &name.sin_addr);
else
name.sin_addr.s_addr = htonl(INADDR_ANY);
name.sin_port = htons(*portnum);
#ifdef PARANOID