mirror of
https://github.com/tmate-io/tmate-ssh-server.git
synced 2020-11-18 19:53:51 -08:00
Avoid sending innapropriate client_left() msgs to proxy
This commit is contained in:
parent
52f686b621
commit
3ad79d43f9
@ -196,6 +196,8 @@ void tmate_notify_client_join(__unused struct tmate_session *session,
|
|||||||
if (!tmate_has_proxy())
|
if (!tmate_has_proxy())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
c->flags |= CLIENT_TMATE_NOTIFIED_JOIN;
|
||||||
|
|
||||||
pack(array, 5);
|
pack(array, 5);
|
||||||
pack(int, TMATE_CTL_CLIENT_JOIN);
|
pack(int, TMATE_CTL_CLIENT_JOIN);
|
||||||
pack(int, c->id);
|
pack(int, c->id);
|
||||||
@ -212,6 +214,11 @@ void tmate_notify_client_left(__unused struct tmate_session *session,
|
|||||||
if (!tmate_has_proxy())
|
if (!tmate_has_proxy())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!(c->flags & CLIENT_TMATE_NOTIFIED_JOIN))
|
||||||
|
return;
|
||||||
|
|
||||||
|
c->flags &= ~CLIENT_TMATE_NOTIFIED_JOIN;
|
||||||
|
|
||||||
pack(array, 2);
|
pack(array, 2);
|
||||||
pack(int, TMATE_CTL_CLIENT_LEFT);
|
pack(int, TMATE_CTL_CLIENT_LEFT);
|
||||||
pack(int, c->id);
|
pack(int, c->id);
|
||||||
|
3
tmux.h
3
tmux.h
@ -1280,6 +1280,9 @@ struct client {
|
|||||||
#define CLIENT_256COLOURS 0x20000
|
#define CLIENT_256COLOURS 0x20000
|
||||||
#define CLIENT_IDENTIFIED 0x40000
|
#define CLIENT_IDENTIFIED 0x40000
|
||||||
#define CLIENT_STATUSFORCE 0x80000
|
#define CLIENT_STATUSFORCE 0x80000
|
||||||
|
#ifdef TMATE_SLAVE
|
||||||
|
#define CLIENT_TMATE_NOTIFIED_JOIN 0x10000000
|
||||||
|
#endif
|
||||||
int flags;
|
int flags;
|
||||||
struct key_table *keytable;
|
struct key_table *keytable;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user