Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
75eaac5c
Commit
75eaac5c
authored
Feb 02, 2012
by
antirez
Browse files
Added a server.arch_bits field instead of computing it at runtime for INFO.
parent
b80b1c59
Changes
2
Show whitespace changes
Inline
Side-by-side
src/redis.c
View file @
75eaac5c
...
...
@@ -860,6 +860,7 @@ void createSharedObjects(void) {
}
void initServerConfig() {
server.arch_bits = (sizeof(long) == 8) ? 64 : 32;
server.port = REDIS_SERVERPORT;
server.bindaddr = NULL;
server.unixsocket = NULL;
...
...
@@ -1439,7 +1440,7 @@ sds genRedisInfoString(char *section) {
"redis_version:%s\r\n"
"redis_git_sha1:%s\r\n"
"redis_git_dirty:%d\r\n"
"arch_bits:%
s
\r\n"
"arch_bits:%
d
\r\n"
"multiplexing_api:%s\r\n"
"gcc_version:%d.%d.%d\r\n"
"process_id:%ld\r\n"
...
...
@@ -1450,7 +1451,7 @@ sds genRedisInfoString(char *section) {
REDIS_VERSION,
redisGitSHA1(),
strtol(redisGitDirty(),NULL,10) > 0,
(sizeof(long) == 8) ? "64" : "32"
,
server.arch_bits
,
aeGetApiName(),
#ifdef __GNUC__
__GNUC__,__GNUC_MINOR__,__GNUC_PATCHLEVEL__,
...
...
src/redis.h
View file @
75eaac5c
...
...
@@ -527,6 +527,7 @@ struct redisServer {
int activerehashing; /* Incremental rehash in serverCron() */
char *requirepass; /* Pass for AUTH command, or NULL */
char *pidfile; /* PID file path */
int arch_bits; /* 32 or 64 depending on sizeof(long) */
/* Networking */
int port; /* TCP listening port */
char *bindaddr; /* Bind address or NULL */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment