case PROTOCOL_BINARY_RESPONSE_AUTH_ERROR:
errstr = "Auth failure.";
break;
- case PROTOCOL_BINARY_RESPONSE_AUTH_CONTINUE:
- assert(false);
- case PROTOCOL_BINARY_RESPONSE_SUCCESS:
- assert(false);
default:
assert(false);
errstr = "UNHANDLED ERROR";
case DELTA_ITEM_CAS_MISMATCH:
write_bin_error(c, PROTOCOL_BINARY_RESPONSE_KEY_EEXISTS, 0);
break;
-
- default:
- assert(0);
- abort();
}
}
eno = PROTOCOL_BINARY_RESPONSE_NOT_STORED;
}
write_bin_error(c, eno, 0);
- default:
- assert(false);
- abort();
}
item_remove(c->item); /* release the c->item reference */
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;
}
case bin_reading_sasl_auth_data:
process_bin_complete_sasl_auth(c);
break;
- case bin_reading_cas_header:
- assert(0);
- case bin_no_state:
- assert(0);
default:
fprintf(stderr, "Not handling substate %d\n", c->substate);
assert(0);
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 *)));
break;
case DELTA_ITEM_CAS_MISMATCH:
break; /* Should never get here */
- default:
- assert(false);
- abort();
}
}
} 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)) {
case REASSIGN_SRC_DST_SAME:
out_string(c, "SAME src and dst class are identical");
break;
- default:
- assert(false);
- abort();
}
return;
} else if (ntokens == 4 &&
case READ_MEMORY_ERROR: /* Failed to allocate more memory */
/* State already set by try_read_network */
break;
- default:
- assert(false);
- abort();
}
break;
case TRANSMIT_SOFT_ERROR:
stop = true;
break;
- default:
- assert(false);
- abort();
}
break;
case conn_max_state:
assert(false);
break;
- default:
- assert(false);
- abort();
}
}
}
#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"
stop_assoc_maintenance_thread();
/* remove the PID file if we're a daemon */
+#if 0
if (do_daemonize)
remove_pidfile(pid_file);
+#endif
/* Clean up strdup() call for bind() address */
if (settings.inter)
free(settings.inter);