mirror of
https://github.com/clearml/dropbear
synced 2025-06-26 18:17:32 +00:00
Fixed stupid agentfwd error (using the listening FD, not the accepted on. gah)
--HG-- extra : convert_revision : 27e793a6395dbf5f2c0aa130d37fad2e4ef67e01
This commit is contained in:
11
svr-x11fwd.c
11
svr-x11fwd.c
@@ -106,6 +106,7 @@ static void x11accept(struct Listener* listener) {
|
||||
struct sockaddr_in addr;
|
||||
int len;
|
||||
int ret;
|
||||
struct ChanSess * chansess = (struct ChanSess *)(listener->typedata);
|
||||
|
||||
len = sizeof(addr);
|
||||
|
||||
@@ -115,8 +116,8 @@ static void x11accept(struct Listener* listener) {
|
||||
}
|
||||
|
||||
/* if single-connection we close it up */
|
||||
if (((struct ChanSess *)(listener->typedata))->x11singleconn) {
|
||||
x11cleanup(listener);
|
||||
if (chansess->x11singleconn) {
|
||||
x11cleanup(chansess);
|
||||
}
|
||||
|
||||
ret = send_msg_channel_open_x11(fd, &addr);
|
||||
@@ -166,13 +167,11 @@ void x11setauth(struct ChanSess *chansess) {
|
||||
}
|
||||
}
|
||||
|
||||
void x11cleanup(struct Listener *listener) {
|
||||
|
||||
struct ChanSess *chansess = (struct ChanSess*)listener->typedata;
|
||||
void x11cleanup(struct ChanSess *chansess) {
|
||||
|
||||
m_free(chansess->x11authprot);
|
||||
m_free(chansess->x11authcookie);
|
||||
remove_listener(listener);
|
||||
remove_listener(chansess->x11listener);
|
||||
chansess->x11listener = NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user