From 95359a0f53a01de261b63d3769323df0b0127171 Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Wed, 9 Apr 2025 14:41:00 -0700 Subject: temporary not return ssh error code, not sure how to deal with it, now only return gtk G_SOURCE_REMOVE error --- remote_plot.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/remote_plot.c b/remote_plot.c index 60930ec..4318ae3 100644 --- a/remote_plot.c +++ b/remote_plot.c @@ -66,7 +66,8 @@ static gboolean sftp_read_sync(gpointer user_data) if (file == NULL) { fprintf(stderr, "Can't open file for reading: %s\n", ssh_get_error(data->session)); - return SSH_ERROR; + //return SSH_ERROR; + return G_SOURCE_REMOVE; } for(int i=0;i<(LEN-1);i++) @@ -80,7 +81,8 @@ static gboolean sftp_read_sync(gpointer user_data) fprintf(stderr, "Error while reading file: %s\n", ssh_get_error(data->session)); sftp_close(file); - return SSH_ERROR; + //return SSH_ERROR; + return G_SOURCE_REMOVE; } //printf("buffer %s",buffer); @@ -96,7 +98,8 @@ static gboolean sftp_read_sync(gpointer user_data) if (rc != SSH_OK) { fprintf(stderr, "Can't close the read file: %s\n", ssh_get_error(data->session)); - return rc; + //return rc; + return G_SOURCE_REMOVE; } for(int i=0;i