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
6919280c
Commit
6919280c
authored
Nov 17, 2017
by
antirez
Browse files
Streams: fix reverse iteration next node jumping.
parent
ee3490ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/t_stream.c
View file @
6919280c
...
@@ -540,7 +540,11 @@ int streamIteratorGetID(streamIterator *si, streamID *id, int64_t *numfields) {
...
@@ -540,7 +540,11 @@ int streamIteratorGetID(streamIterator *si, streamID *id, int64_t *numfields) {
* entry is composed of, and jump backward N times to seek
* entry is composed of, and jump backward N times to seek
* its start. */
* its start. */
int
lp_count
=
lpGetInteger
(
si
->
lp_ele
);
int
lp_count
=
lpGetInteger
(
si
->
lp_ele
);
if
(
lp_count
==
0
)
break
;
/* We reached the master entry. */
if
(
lp_count
==
0
)
{
/* We reached the master entry. */
si
->
lp
=
NULL
;
si
->
lp_ele
=
NULL
;
break
;
}
while
(
lp_count
--
)
si
->
lp_ele
=
lpPrev
(
si
->
lp
,
si
->
lp_ele
);
while
(
lp_count
--
)
si
->
lp_ele
=
lpPrev
(
si
->
lp
,
si
->
lp_ele
);
}
}
...
...
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