+
+ /* Figure out bind address and port */
+ if (bindport != 0)
+ port = htons(bindport);
+ else
+ port = htons(getIntConf(BINDPORT));
+
+ if (bindaddr != NULL && inet_addr(bindaddr) != -1)
+ inet_address = inet_addr(bindaddr);
+ else if (inet_addr(getStrConf(BINDADDR)) != -1)
+ inet_address = inet_addr(getStrConf(BINDADDR));
+ else
+ inet_address = inet_addr("0.0.0.0");
+ Log_info("Bind to %s:%hu", inet_address == 0 ? "*" : inet_ntoa(*((struct in_addr *)&inet_address)), ntohs(port));