From 6fcdc714b64bdc5fe065d90148aa13d4963b565d Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 20 Dec 2010 00:43:24 +0000 Subject: [PATCH] Undo a change to next/previous session that got mixed in prematurely. --- session.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/session.c b/session.c index ba114e4b..6242a156 100644 --- a/session.c +++ b/session.c @@ -187,9 +187,10 @@ session_next_session(struct session *s) struct session *s2; u_int i; - if (ARRAY_LENGTH(&sessions) == 0 || !session_alive(s)) + if (ARRAY_LENGTH(&sessions) == 0 || session_index(s, &i) != 0) return (NULL); + i = 0; do { if (i == ARRAY_LENGTH(&sessions) - 1) i = 0; @@ -208,7 +209,7 @@ session_previous_session(struct session *s) struct session *s2; u_int i; - if (ARRAY_LENGTH(&sessions) == 0 || !session_alive(s)) + if (ARRAY_LENGTH(&sessions) == 0 || session_index(s, &i) != 0) return (NULL); do {