Undo a change to next/previous session that got mixed in prematurely.

This commit is contained in:
Nicholas Marriott 2010-12-20 00:43:24 +00:00
parent 8705c6b435
commit 6fcdc714b6

View File

@ -187,9 +187,10 @@ session_next_session(struct session *s)
struct session *s2; struct session *s2;
u_int i; u_int i;
if (ARRAY_LENGTH(&sessions) == 0 || !session_alive(s)) if (ARRAY_LENGTH(&sessions) == 0 || session_index(s, &i) != 0)
return (NULL); return (NULL);
i = 0;
do { do {
if (i == ARRAY_LENGTH(&sessions) - 1) if (i == ARRAY_LENGTH(&sessions) - 1)
i = 0; i = 0;
@ -208,7 +209,7 @@ session_previous_session(struct session *s)
struct session *s2; struct session *s2;
u_int i; u_int i;
if (ARRAY_LENGTH(&sessions) == 0 || !session_alive(s)) if (ARRAY_LENGTH(&sessions) == 0 || session_index(s, &i) != 0)
return (NULL); return (NULL);
do { do {