Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
e63943a4
Commit
e63943a4
authored
Mar 26, 2009
by
antirez
Browse files
AUTH merged from Brian Hammond fork, reworked a bit to fix minor problems
parent
abcb223e
Changes
2
Hide whitespace changes
Inline
Side-by-side
TODO
View file @
e63943a4
- Protocol changes as discussed in the Redis group
- Protocol changes as discussed in the Redis group
- keys expire
- keys expire
- sunion ssub
- sunion ssub
- write integers in a special way on disk
(and on memory?)
- write integers in a special way on disk
, use the unused 11|.... length.
- compact types for disk storing of short strings (no 4 bytes overhead!)
- compact types for disk storing of short strings (no 4 bytes overhead!)
- network layer stresser in test in demo
- network layer stresser in test in demo
- maxclients directive
- maxclients directive
...
...
redis.c
View file @
e63943a4
...
@@ -1099,10 +1099,6 @@ static int processCommand(redisClient *c) {
...
@@ -1099,10 +1099,6 @@ static int processCommand(redisClient *c) {
addReplySds
(
c
,
sdsnew
(
"-ERR wrong number of arguments
\r\n
"
));
addReplySds
(
c
,
sdsnew
(
"-ERR wrong number of arguments
\r\n
"
));
resetClient
(
c
);
resetClient
(
c
);
return
1
;
return
1
;
}
else
if
(
server
.
requirepass
&&
!
c
->
authenticated
&&
strcmp
(
c
->
argv
[
0
]
->
ptr
,
"auth"
))
{
addReplySds
(
c
,
sdsnew
(
"-ERR operation not permitted
\r\n
"
));
resetClient
(
c
);
return
1
;
}
else
if
(
cmd
->
flags
&
REDIS_CMD_BULK
&&
c
->
bulklen
==
-
1
)
{
}
else
if
(
cmd
->
flags
&
REDIS_CMD_BULK
&&
c
->
bulklen
==
-
1
)
{
int
bulklen
=
atoi
(
c
->
argv
[
c
->
argc
-
1
]
->
ptr
);
int
bulklen
=
atoi
(
c
->
argv
[
c
->
argc
-
1
]
->
ptr
);
...
@@ -1131,6 +1127,13 @@ static int processCommand(redisClient *c) {
...
@@ -1131,6 +1127,13 @@ static int processCommand(redisClient *c) {
for
(
j
=
1
;
j
<
c
->
argc
;
j
++
)
for
(
j
=
1
;
j
<
c
->
argc
;
j
++
)
c
->
argv
[
j
]
=
tryObjectSharing
(
c
->
argv
[
j
]);
c
->
argv
[
j
]
=
tryObjectSharing
(
c
->
argv
[
j
]);
}
}
/* Check if the user is authenticated */
if
(
server
.
requirepass
&&
!
c
->
authenticated
&&
cmd
->
proc
!=
authCommand
)
{
addReplySds
(
c
,
sdsnew
(
"-ERR operation not permitted
\r\n
"
));
resetClient
(
c
);
return
1
;
}
/* Exec the command */
/* Exec the command */
dirty
=
server
.
dirty
;
dirty
=
server
.
dirty
;
cmd
->
proc
(
c
);
cmd
->
proc
(
c
);
...
...
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