switch (c->cmd) {
case PROTOCOL_BINARY_CMD_VERSION:
if (extlen == 0 && keylen == 0 && bodylen == 0) {
- write_bin_response(c, VERSION, 0, 0, strlen(VERSION));
+ write_bin_response(c, RVERSION, 0, 0, strlen(RVERSION));
} else {
protocol_error = 1;
}
APPEND_STAT("pid", "%lu", (long)pid);
APPEND_STAT("uptime", "%u", now);
APPEND_STAT("time", "%ld", now + (long)process_started);
- APPEND_STAT("version", "%s", VERSION);
+ APPEND_STAT("version", "%s", RVERSION);
APPEND_STAT("libevent", "%s", event_get_version());
APPEND_STAT("pointer_size", "%d", (int)(8 * sizeof(void *)));
} else if (ntokens == 2 && (strcmp(tokens[COMMAND_TOKEN].value, "version") == 0)) {
- out_string(c, "VERSION " VERSION);
+ out_string(c, "VERSION " RVERSION);
} else if (ntokens == 2 && (strcmp(tokens[COMMAND_TOKEN].value, "quit") == 0)) {
}
#endif
- setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, (void *)&flags, sizeof(flags));
+ error = setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, &flags, sizeof(flags));
+ if (error != 0)
+ {
+ perror("setsockopt(SO_REUSEADDR)");
+ }
+
if (IS_UDP(transport)) {
maximize_sndbuf(sfd);
} else {
}
static void usage(void) {
- printf(PACKAGE " " VERSION "\n");
+ printf(RPACKAGE " " RVERSION "\n");
printf("-p <num> TCP port number to listen on (default: 11211)\n"
"-U <num> UDP port number to listen on (default: 11211, 0 is off)\n"
"-s <file> UNIX socket path to listen on (disables network support)\n"
}
static void usage_license(void) {
- printf(PACKAGE " " VERSION "\n\n");
+ printf(RPACKAGE " " RVERSION "\n\n");
printf(
"Copyright (c) 2003, Danga Interactive, Inc. <http://www.danga.com/>\n"
"All rights reserved.\n"