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
4e38ced4
Commit
4e38ced4
authored
Apr 26, 2019
by
vattezhang
Browse files
fix: benchmark auth fails when server have requirepass
parent
bc36404c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-benchmark.c
View file @
4e38ced4
...
@@ -254,6 +254,19 @@ static redisConfig *getRedisConfig(const char *ip, int port,
...
@@ -254,6 +254,19 @@ static redisConfig *getRedisConfig(const char *ip, int port,
else
fprintf
(
stderr
,
"%s: %s
\n
"
,
hostsocket
,
err
);
else
fprintf
(
stderr
,
"%s: %s
\n
"
,
hostsocket
,
err
);
goto
fail
;
goto
fail
;
}
}
if
(
config
.
auth
){
void
*
authReply
=
NULL
;
redisAppendCommand
(
c
,
"AUTH %s"
,
config
.
auth
);
if
(
REDIS_OK
!=
redisGetReply
(
c
,
&
authReply
))
goto
fail
;
if
(
reply
)
freeReplyObject
(
reply
);
reply
=
((
redisReply
*
)
authReply
);
if
(
reply
->
type
==
REDIS_REPLY_ERROR
)
{
fprintf
(
stderr
,
"ERROR: %s
\n
"
,
reply
->
str
);
goto
fail
;
}
}
redisAppendCommand
(
c
,
"CONFIG GET %s"
,
"save"
);
redisAppendCommand
(
c
,
"CONFIG GET %s"
,
"save"
);
redisAppendCommand
(
c
,
"CONFIG GET %s"
,
"appendonly"
);
redisAppendCommand
(
c
,
"CONFIG GET %s"
,
"appendonly"
);
int
i
=
0
;
int
i
=
0
;
...
...
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