Commit dbd4752b authored by Antenore Gatta's avatar Antenore Gatta

libssh and gdk_cursor deprecations warning

parent ddfdbd3d
......@@ -281,17 +281,23 @@ static gboolean remmina_nx_session_get_response(RemminaNXSession *nx)
if (is_stderr > 1)
return FALSE;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
buffer = buffer_new();
len = channel_read_buffer(nx->channel, buffer, len, is_stderr);
G_GNUC_END_IGNORE_DEPRECATIONS
if (len <= 0) {
remmina_nx_session_set_application_error(nx, "Channel closed.");
return FALSE;
}
if (len > 0) {
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
g_string_append_len(nx->response, (const gchar*) buffer_get(buffer), len);
G_GNUC_END_IGNORE_DEPRECATIONS
}
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
buffer_free(buffer);
G_GNUC_END_IGNORE_DEPRECATIONS
return TRUE;
}
......@@ -826,7 +832,9 @@ static gpointer remmina_nx_session_tunnel_main_thread(gpointer data)
else if (len > 0) {
for (ptr = buffer, lenw = 0; len > 0; len -= lenw, ptr += lenw) {
ssh_set_fd_towrite(nx->session);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
lenw = channel_write(channels[0], (char*) ptr, len);
G_GNUC_END_IGNORE_DEPRECATIONS
if (lenw <= 0) {
nx->running = FALSE;
break;
......@@ -839,7 +847,9 @@ static gpointer remmina_nx_session_tunnel_main_thread(gpointer data)
break;
if (channels_out[0] && socketbuffer_len <= 0) {
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
len = channel_read_nonblocking(channels_out[0], socketbuffer, sizeof(socketbuffer), 0);
G_GNUC_END_IGNORE_DEPRECATIONS
if (len == SSH_ERROR || len == SSH_EOF) {
nx->running = FALSE;
break;
......@@ -848,7 +858,9 @@ static gpointer remmina_nx_session_tunnel_main_thread(gpointer data)
socketbuffer_len = len;
} else {
/* Clean up the stderr buffer in case FreeNX send something there */
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
len = channel_read_nonblocking(channels_out[0], buffer, sizeof(buffer), 1);
G_GNUC_END_IGNORE_DEPRECATIONS
}
}
......
......@@ -831,7 +831,7 @@ static void remmina_rdp_event_cursor(RemminaProtocolWidget* gp, RemminaPluginRdp
break;
case REMMINA_RDP_POINTER_NULL:
gdk_window_set_cursor(gtk_widget_get_window(rfi->drawing_area), gdk_cursor_new(GDK_BLANK_CURSOR));
gdk_window_set_cursor(gtk_widget_get_window(rfi->drawing_area), gdk_cursor_new_for_display(gdk_display_get_default(), GDK_BLANK_CURSOR));
ui->retval = 1;
break;
......
......@@ -954,7 +954,7 @@ static gboolean
remmina_sftp_client_refresh (RemminaSFTPClient *client)
{
TRACE_CALL("remmina_sftp_client_refresh");
SET_CURSOR (gdk_cursor_new (GDK_WATCH));
SET_CURSOR (gdk_cursor_new_for_display(gdk_display_get_default(), GDK_WATCH));
gdk_flush ();
remmina_sftp_client_on_opendir (client, ".", NULL);
......@@ -1070,7 +1070,7 @@ remmina_sftp_client_new_init (RemminaSFTP *sftp)
client = remmina_sftp_client_new ();
SET_CURSOR (gdk_cursor_new (GDK_WATCH));
SET_CURSOR (gdk_cursor_new_for_display(gdk_display_get_default(), GDK_WATCH));
gdk_flush ();
if (!remmina_ssh_init_session (REMMINA_SSH (sftp)) ||
......
......@@ -821,6 +821,7 @@ remmina_ssh_tunnel_main_thread_proc (gpointer data)
/* Detect the next available port starting from 6010 on the server */
for (i = 10; i <= MAX_X_DISPLAY_NUMBER; i++)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
if (ssh_forward_listen (REMMINA_SSH (tunnel)->session, (tunnel->bindlocalhost ? "localhost" : NULL), 6000 + i, NULL))
{
continue;
......@@ -830,6 +831,7 @@ remmina_ssh_tunnel_main_thread_proc (gpointer data)
tunnel->remotedisplay = i;
break;
}
G_GNUC_END_IGNORE_DEPRECATIONS
}
if (tunnel->remotedisplay < 1)
{
......@@ -856,8 +858,10 @@ remmina_ssh_tunnel_main_thread_proc (gpointer data)
break;
case REMMINA_SSH_TUNNEL_REVERSE:
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
if (ssh_forward_listen (REMMINA_SSH (tunnel)->session, NULL, tunnel->port, NULL))
{
G_GNUC_END_IGNORE_DEPRECATIONS
remmina_ssh_set_error (REMMINA_SSH (tunnel), _("Failed to request port forwarding : %s"));
if (tunnel->disconnect_func)
{
......@@ -919,8 +923,10 @@ remmina_ssh_tunnel_main_thread_proc (gpointer data)
}
if (tunnel->tunnel_type == REMMINA_SSH_TUNNEL_REVERSE)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
/* For reverse tunnel, we only need one connection. */
ssh_forward_cancel (REMMINA_SSH (tunnel)->session, NULL, tunnel->port);
G_GNUC_END_IGNORE_DEPRECATIONS
}
}
else if (tunnel->tunnel_type != REMMINA_SSH_TUNNEL_REVERSE)
......@@ -1262,7 +1268,9 @@ remmina_ssh_tunnel_free (RemminaSSHTunnel* tunnel)
if (tunnel->tunnel_type == REMMINA_SSH_TUNNEL_XPORT && tunnel->remotedisplay > 0)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
ssh_forward_cancel (REMMINA_SSH (tunnel)->session, NULL, 6000 + tunnel->remotedisplay);
G_GNUC_END_IGNORE_DEPRECATIONS
}
if (tunnel->server_sock >= 0)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment