[memcached] sgrimm,
r420: Rename "exit" variable in drive_machine ...
commits at code.sixapart.com
commits at code.sixapart.com
Thu Oct 19 23:29:55 UTC 2006
Rename "exit" variable in drive_machine to "stop" to make it easier to examine
in gdb, which assumes that the unqualified name "exit" is a reference to the
exit() function.
No functional change.
U trunk/server/memcached.c
Modified: trunk/server/memcached.c
===================================================================
--- trunk/server/memcached.c 2006-10-15 08:58:28 UTC (rev 419)
+++ trunk/server/memcached.c 2006-10-19 23:29:55 UTC (rev 420)
@@ -1406,20 +1406,20 @@
void drive_machine(conn *c) {
- int exit = 0;
+ int stop = 0;
int sfd, flags = 1;
socklen_t addrlen;
struct sockaddr addr;
conn *newc;
int res;
- while (!exit) {
+ while (!stop) {
switch(c->state) {
case conn_listening:
addrlen = sizeof(addr);
if ((sfd = accept(c->sfd, &addr, &addrlen)) == -1) {
if (errno == EAGAIN || errno == EWOULDBLOCK) {
- exit = 1;
+ stop = 1;
break;
} else {
perror("accept()");
@@ -1457,7 +1457,7 @@
conn_set_state(c, conn_closing);
break;
}
- exit = 1;
+ stop = 1;
break;
case conn_nread:
@@ -1496,7 +1496,7 @@
conn_set_state(c, conn_closing);
break;
}
- exit = 1;
+ stop = 1;
break;
}
/* otherwise we have a real error, on which we close the connection */
@@ -1539,7 +1539,7 @@
conn_set_state(c, conn_closing);
break;
}
- exit = 1;
+ stop = 1;
break;
}
/* otherwise we have a real error, on which we close the connection */
@@ -1596,7 +1596,7 @@
break; /* Continue in state machine. */
case TRANSMIT_SOFT_ERROR:
- exit = 1;
+ stop = 1;
break;
}
break;
@@ -1606,7 +1606,7 @@
conn_cleanup(c);
else
conn_close(c);
- exit = 1;
+ stop = 1;
break;
}
More information about the memcached-commits
mailing list