From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 2 Sep 1996 00:16:19 -0400 From: scott@angora.cse.psu.edu scott@angora.cse.psu.edu Subject: No subject Topicbox-Message-UUID: 4c3318f6-eac8-11e9-9e20-41e7f4b1d025 Message-ID: <19960902041619.mN6ygdZ_mKZ408SBCxHJKBTJajtP8HPTUGj_CgYgAgQ@z> One more ape bug... A common unix idiom is bind followed by listen. In ape, bind sets the socket's port, and but listen also tries to do that. To avoid an error in that case, I propose listen.c:139 be modified as follows: if(lip->sin_port >= 0) { if (write(cfd, "bind 0", 6) < 0) { errno = EGREG; close(cfd); return -1; } sprintf(msg, "announce %d", ntohs(lip->sin_port));