mirror of
https://github.com/tmate-io/tmate.git
synced 2024-12-25 16:19:02 +01:00
Sync OpenBSD patchset 804:
Undo a change to next/previous session that got mixed in prematurely.
This commit is contained in:
parent
a932742a8a
commit
c05a47ad0d
@ -1,4 +1,4 @@
|
||||
/* $Id: session.c,v 1.80 2010-12-22 15:31:56 tcunha Exp $ */
|
||||
/* $Id: session.c,v 1.81 2010-12-22 15:32:40 tcunha Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -186,9 +186,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;
|
||||
@ -207,7 +208,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 {
|
||||
|
Loading…
Reference in New Issue
Block a user