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
hiredis
Commits
b6b96f77
Commit
b6b96f77
authored
Nov 22, 2010
by
Pieter Noordhuis
Browse files
Make error messages consistent in casing
parent
537e64e9
Changes
3
Hide whitespace changes
Inline
Side-by-side
hiredis.c
View file @
b6b96f77
...
...
@@ -347,7 +347,7 @@ static int processItem(redisReader *r) {
default:
byte
=
sdscatrepr
(
sdsempty
(),
p
,
1
);
redisSetReplyReaderError
(
r
,
sdscatprintf
(
sdsempty
(),
"
p
rotocol error, got %s as reply type byte"
,
byte
));
"
P
rotocol error, got %s as reply type byte"
,
byte
));
sdsfree
(
byte
);
return
-
1
;
}
...
...
net.c
View file @
b6b96f77
...
...
@@ -114,7 +114,7 @@ int redisContextConnectTcp(redisContext *c, const char *addr, int port) {
he
=
gethostbyname
(
addr
);
if
(
he
==
NULL
)
{
__redisSetError
(
c
,
REDIS_ERR_OTHER
,
sdscatprintf
(
sdsempty
(),
"
c
an't resolve: %s"
,
addr
));
sdscatprintf
(
sdsempty
(),
"
C
an't resolve: %s"
,
addr
));
close
(
s
);
return
REDIS_ERR
;
}
...
...
test.c
View file @
b6b96f77
...
...
@@ -99,7 +99,7 @@ static void test_blocking_connection() {
test
(
"Returns error when host cannot be resolved: "
);
c
=
redisConnect
((
char
*
)
"idontexist.local"
,
6379
);
test_cond
(
c
->
err
==
REDIS_ERR_OTHER
&&
strcmp
(
c
->
errstr
,
"
c
an't resolve: idontexist.local"
)
==
0
);
strcmp
(
c
->
errstr
,
"
C
an't resolve: idontexist.local"
)
==
0
);
redisFree
(
c
);
test
(
"Returns error when the port is not open: "
);
...
...
@@ -240,7 +240,7 @@ static void test_reply_reader() {
ret
=
redisReplyReaderGetReply
(
reader
,
NULL
);
err
=
redisReplyReaderGetError
(
reader
);
test_cond
(
ret
==
REDIS_ERR
&&
strcasecmp
(
err
,
"
p
rotocol error, got
\"
@
\"
as reply type byte"
)
==
0
);
strcasecmp
(
err
,
"
P
rotocol error, got
\"
@
\"
as reply type byte"
)
==
0
);
redisReplyReaderFree
(
reader
);
/* when the reply already contains multiple items, they must be free'd
...
...
@@ -253,7 +253,7 @@ static void test_reply_reader() {
ret
=
redisReplyReaderGetReply
(
reader
,
NULL
);
err
=
redisReplyReaderGetError
(
reader
);
test_cond
(
ret
==
REDIS_ERR
&&
strcasecmp
(
err
,
"
p
rotocol error, got
\"
@
\"
as reply type byte"
)
==
0
);
strcasecmp
(
err
,
"
P
rotocol error, got
\"
@
\"
as reply type byte"
)
==
0
);
redisReplyReaderFree
(
reader
);
test
(
"Works with NULL functions for reply: "
);
...
...
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