2224 * arrives. Then it will return the address of |
2224 * arrives. Then it will return the address of |
2225 * the connecting peer, and a new socket |
2225 * the connecting peer, and a new socket |
2226 * descriptor, s, for that connection. |
2226 * descriptor, s, for that connection. |
2227 */ |
2227 */ |
2228 s = accept(ls, (struct sockaddr *)&peeraddr_in, &addrlen); |
2228 s = accept(ls, (struct sockaddr *)&peeraddr_in, &addrlen); |
2229 syslog(LOG_NOTICE, "my_server_loop accept socket %d", s); |
2229 // syslog(LOG_NOTICE, "my_server_loop accept socket %d", s); |
2230 if (s == -1) { |
2230 if (s == -1) { |
2231 syslog(LOG_NOTICE, "my_server_loop accept failed %s", strerror(errno)); |
2231 syslog(LOG_NOTICE, "my_server_loop accept failed %s", strerror(errno)); |
2232 break; |
2232 break; |
2233 } |
2233 } |
2234 if (my_server_shutdown) |
2234 if (my_server_shutdown) |