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
86d87e35
Commit
86d87e35
authored
Mar 28, 2013
by
charsyam
Committed by
antirez
Mar 29, 2013
Browse files
Support for case unsensitive SET options.
parent
dfc31a1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/t_string.c
View file @
86d87e35
...
...
@@ -101,15 +101,19 @@ void setCommand(redisClient *c) {
char
*
a
=
c
->
argv
[
j
]
->
ptr
;
robj
*
next
=
(
j
==
c
->
argc
-
1
)
?
NULL
:
c
->
argv
[
j
+
1
];
if
(
a
[
0
]
==
'n'
&&
a
[
1
]
==
'x'
&&
a
[
2
]
==
'\0'
)
{
if
((
a
[
0
]
==
'n'
||
a
[
0
]
==
'N'
)
&&
(
a
[
1
]
==
'x'
||
a
[
1
]
==
'X'
)
&&
a
[
2
]
==
'\0'
)
{
flags
|=
REDIS_SET_NX
;
}
else
if
(
a
[
0
]
==
'x'
&&
a
[
1
]
==
'x'
&&
a
[
2
]
==
'\0'
)
{
}
else
if
((
a
[
0
]
==
'x'
||
a
[
0
]
==
'X'
)
&&
(
a
[
1
]
==
'x'
||
a
[
1
]
==
'X'
)
&&
a
[
2
]
==
'\0'
)
{
flags
|=
REDIS_SET_XX
;
}
else
if
(
a
[
0
]
==
'e'
&&
a
[
1
]
==
'x'
&&
a
[
2
]
==
'\0'
&&
next
)
{
}
else
if
((
a
[
0
]
==
'e'
||
a
[
0
]
==
'E'
)
&&
(
a
[
1
]
==
'x'
||
a
[
1
]
==
'X'
)
&&
a
[
2
]
==
'\0'
&&
next
)
{
unit
=
UNIT_SECONDS
;
expire
=
next
;
j
++
;
}
else
if
(
a
[
0
]
==
'p'
&&
a
[
1
]
==
'x'
&&
a
[
2
]
==
'\0'
&&
next
)
{
}
else
if
((
a
[
0
]
==
'p'
||
a
[
0
]
==
'P'
)
&&
(
a
[
1
]
==
'x'
||
a
[
1
]
==
'X'
)
&&
a
[
2
]
==
'\0'
&&
next
)
{
unit
=
UNIT_MILLISECONDS
;
expire
=
next
;
j
++
;
...
...
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