| 1106 | #endif |
| 1107 | |
| 1108 | static void socksetup(struct string_list *listen_addr, int listen_port, struct socketlist *socklist) |
| 1109 | { |
| 1110 | if (!listen_addr->nr) |
| 1111 | setup_named_sock(NULL, listen_port, socklist); |
| 1112 | else { |
| 1113 | int socknum; |
| 1114 | for (size_t i = 0; i < listen_addr->nr; i++) { |
| 1115 | socknum = setup_named_sock(listen_addr->items[i].string, |
| 1116 | listen_port, socklist); |
| 1117 | |
| 1118 | if (socknum == 0) |
| 1119 | logerror("unable to allocate any listen sockets for host %s on port %u", |
| 1120 | listen_addr->items[i].string, listen_port); |
| 1121 | } |
| 1122 | } |
| 1123 | } |
| 1124 | |
| 1125 | static int service_loop(struct socketlist *socklist) |
| 1126 | { |
no test coverage detected