GUACAMOLE-269: Move constant declaration to ttymode.c
This commit is contained in:
parent
f1bf70a4a2
commit
5583748b54
@ -29,6 +29,7 @@ libguac_client_ssh_la_SOURCES = \
|
|||||||
settings.c \
|
settings.c \
|
||||||
sftp.c \
|
sftp.c \
|
||||||
ssh.c \
|
ssh.c \
|
||||||
|
ttymode.c \
|
||||||
user.c
|
user.c
|
||||||
|
|
||||||
noinst_HEADERS = \
|
noinst_HEADERS = \
|
||||||
|
@ -298,8 +298,8 @@ void* ssh_client_thread(void* data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Request PTY */
|
/* Request PTY */
|
||||||
if (libssh2_channel_request_pty_ex(ssh_client->term_channel, "linux", sizeof("linux")-1, guac_tty_modes,
|
if (libssh2_channel_request_pty_ex(ssh_client->term_channel, "linux", sizeof("linux")-1, GUAC_SSH_TTY_MODES,
|
||||||
sizeof(guac_tty_modes), ssh_client->term->term_width, ssh_client->term->term_height, 0, 0)) {
|
sizeof(GUAC_SSH_TTY_MODES), ssh_client->term->term_width, ssh_client->term->term_height, 0, 0)) {
|
||||||
guac_client_abort(client, GUAC_PROTOCOL_STATUS_UPSTREAM_ERROR, "Unable to allocate PTY.");
|
guac_client_abort(client, GUAC_PROTOCOL_STATUS_UPSTREAM_ERROR, "Unable to allocate PTY.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
27
src/protocols/ssh/ttymode.c
Normal file
27
src/protocols/ssh/ttymode.c
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include "ttymode.h"
|
||||||
|
|
||||||
|
const char GUAC_SSH_TTY_MODES[6] = {
|
||||||
|
GUAC_SSH_TTY_OP_VERASE,
|
||||||
|
0, 0, 0, GUAC_SSH_TERM_DEFAULT_BACKSPACE,
|
||||||
|
GUAC_SSH_TTY_OP_END
|
||||||
|
};
|
@ -22,15 +22,11 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#define TTY_OP_END 0
|
#define GUAC_SSH_TTY_OP_END 0
|
||||||
#define TTY_OP_VERASE 3
|
#define GUAC_SSH_TTY_OP_VERASE 3
|
||||||
|
|
||||||
#define GUAC_SSH_TERM_DEFAULT_BACKSPACE 127
|
#define GUAC_SSH_TERM_DEFAULT_BACKSPACE 127
|
||||||
|
|
||||||
char guac_tty_modes[] = {
|
extern const char GUAC_SSH_TTY_MODES[6];
|
||||||
TTY_OP_VERASE,
|
|
||||||
0, 0, 0, GUAC_SSH_TERM_DEFAULT_BACKSPACE,
|
|
||||||
TTY_OP_END
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user