X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Foserver%2F_info;h=85ed0bf7881684c93ee5178d6af0a2366303cb04;hb=a2a89814bd9b71612778cbb1fed3ae0d8cadc6b5;hp=087b0436185d69db59678f70e8e232210aaa900c;hpb=916074dc3309c4e94d8192ee57633f8a0e9d48d3;p=ccan-lca-2011.git diff --git a/ccan/oserver/_info b/ccan/oserver/_info index 087b043..85ed0bf 100644 --- a/ccan/oserver/_info +++ b/ccan/oserver/_info @@ -20,12 +20,16 @@ * int fd, sockfd; * * sockfd = oserver_setup(); + * if (sockfd < 0) + * err(1, "Failed to set up server socket"); * * fd = accept(sockfd, NULL, NULL); * if (fd < 0) * err(1, "Accepting connection on TCP socket"); * - * oserver_serve(fd); + * if (!oserver_serve(fd)) + * err(1, "Serving client"); + * exit(0); * } */ int main(int argc, char *argv[]) @@ -35,8 +39,11 @@ int main(int argc, char *argv[]) return 1; if (strcmp(argv[1], "depends") == 0) { - printf("ccan/compiler\n"); printf("ccan/read_write_all\n"); + printf("ccan/str\n"); + printf("ccan/foreach\n"); + printf("ccan/noerr\n"); + printf("ccan/failtest\n"); return 0; }