aboutsummaryrefslogtreecommitdiff
path: root/dpi/file.c
diff options
context:
space:
mode:
authorJorge Arellano Cid <jcid@dillo.org>2009-11-18 10:29:43 -0300
committerJorge Arellano Cid <jcid@dillo.org>2009-11-18 10:29:43 -0300
commit1b304002e49e51f342da29aa4dc2c709ed398694 (patch)
treee0208d6dcceb13a3a7787cec86ddfc6767dbab00 /dpi/file.c
parentdf9295e0123287f5ca13721e4a90d83fb62ba711 (diff)
Fixed bookmarks "cancel" link (Add/Mod URL, Add Sec). Also s/tmp_fd/sock_fd.
Diffstat (limited to 'dpi/file.c')
-rw-r--r--dpi/file.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/dpi/file.c b/dpi/file.c
index 61f25865..94cd860c 100644
--- a/dpi/file.c
+++ b/dpi/file.c
@@ -1046,7 +1046,7 @@ int main(void)
{
struct sockaddr_in sin;
socklen_t sin_sz;
- int tmp_fd, c_st, st = 1;
+ int sock_fd, c_st, st = 1;
/* Arrange the cleanup function for abnormal terminations */
if (signal (SIGINT, termination_handler) == SIG_IGN)
@@ -1089,19 +1089,19 @@ int main(void)
if (FD_ISSET(STDIN_FILENO, &read_set)) {
/* accept the incoming connection */
do {
- tmp_fd = accept(STDIN_FILENO, (struct sockaddr *)&sin, &sin_sz);
- } while (tmp_fd < 0 && errno == EINTR);
- if (tmp_fd == -1) {
+ sock_fd = accept(STDIN_FILENO, (struct sockaddr *)&sin, &sin_sz);
+ } while (sock_fd < 0 && errno == EINTR);
+ if (sock_fd == -1) {
if (errno == EAGAIN)
continue;
MSG(" accept() %s\n", dStrerror(errno));
break;
} else {
- _MSG(" accept() fd=%d\n", tmp_fd);
+ _MSG(" accept() fd=%d\n", sock_fd);
/* Set nonblocking */
- fcntl(tmp_fd, F_SETFL, O_NONBLOCK | fcntl(tmp_fd, F_GETFL));
+ fcntl(sock_fd, F_SETFL, O_NONBLOCK | fcntl(sock_fd, F_GETFL));
/* Create and initialize a new client */
- File_add_client(tmp_fd);
+ File_add_client(sock_fd);
}
continue;
}