Mercurial > gftp.yaz
changeset 526:990088b18285
2004-8-9 Brian Masney <masneyb@gftp.org>
* lib/config_file.c lib/options.h lib/rfc959.c - fixed warnings about
unitialized members in the structure
* lib/pty.c (gftp_exec) - setup stderr when running the program
* lib/sshv2.c src/uicommon/gftpui.h - fixed signed/unsigned integer
comparisions
* lib/sshv2.c - added sshv2_copy_param_options()
* src/gtk/options_dialog.c - compile fix when compiling against GTK+
1.2
author | masneyb |
---|---|
date | Tue, 10 Aug 2004 01:55:53 +0000 |
parents | 7262851e3ae8 |
children | d0e8f8ee3b20 |
files | ChangeLog lib/config_file.c lib/options.h lib/pty.c lib/rfc959.c lib/sshv2.c src/gtk/options_dialog.c src/uicommon/gftpui.h |
diffstat | 8 files changed, 78 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun Aug 01 11:03:39 2004 +0000 +++ b/ChangeLog Tue Aug 10 01:55:53 2004 +0000 @@ -1,3 +1,17 @@ +2004-8-9 Brian Masney <masneyb@gftp.org> + * lib/config_file.c lib/options.h lib/rfc959.c - fixed warnings about + unitialized members in the structure + + * lib/pty.c (gftp_exec) - setup stderr when running the program + + * lib/sshv2.c src/uicommon/gftpui.h - fixed signed/unsigned integer + comparisions + + * lib/sshv2.c - added sshv2_copy_param_options() + + * src/gtk/options_dialog.c - compile fix when compiling against GTK+ + 1.2 + 2004-8-1 Brian Masney <masneyb@gftp.org> * lib/sshv2.c - treat all integers from the remote server as unsigned @@ -2702,7 +2716,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.300 2004/08/01 11:03:38 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.301 2004/08/10 01:55:52 masneyb Exp $ tags * debian/* - updated files from Debian maintainer
--- a/lib/config_file.c Sun Aug 01 11:03:39 2004 +0000 +++ b/lib/config_file.c Tue Aug 10 01:55:53 2004 +0000 @@ -1224,30 +1224,34 @@ gftp_option_type_enum in gftp.h */ gftp_option_type_var gftp_option_types[] = { {gftp_config_file_read_text, gftp_config_file_write_text, - gftp_config_file_copy_text, gftp_config_file_compare_text, NULL, NULL, NULL}, + gftp_config_file_copy_text, gftp_config_file_compare_text, NULL, NULL, NULL, + NULL}, {gftp_config_file_read_textcombo, gftp_config_file_write_text, - gftp_config_file_copy_text, gftp_config_file_compare_text, NULL, NULL, NULL}, + gftp_config_file_copy_text, gftp_config_file_compare_text, NULL, NULL, NULL, + NULL}, {gftp_config_file_read_text, gftp_config_file_write_text, - gftp_config_file_copy_text, gftp_config_file_compare_text, NULL, NULL, NULL}, + gftp_config_file_copy_text, gftp_config_file_compare_text, NULL, NULL, NULL, + NULL}, {gftp_config_file_read_text, gftp_config_file_write_hidetext, - gftp_config_file_copy_text, gftp_config_file_compare_text, NULL, NULL, NULL}, + gftp_config_file_copy_text, gftp_config_file_compare_text, NULL, NULL, NULL, + NULL}, {gftp_config_file_read_int, gftp_config_file_write_int, gftp_config_file_copy_ptr_contents, gftp_config_file_compare_int, - NULL, NULL, NULL}, + NULL, NULL, NULL, NULL}, {gftp_config_file_read_checkbox, gftp_config_file_write_int, gftp_config_file_copy_ptr_contents, gftp_config_file_compare_int, - NULL, NULL, NULL}, + NULL, NULL, NULL, NULL}, {gftp_config_file_read_intcombo, gftp_config_file_write_intcombo, gftp_config_file_copy_ptr_contents, gftp_config_file_compare_int, - NULL, NULL, NULL}, + NULL, NULL, NULL, NULL}, {gftp_config_file_read_float, gftp_config_file_write_float, gftp_config_file_copy_ptr_contents, gftp_config_file_compare_float, - NULL, NULL, NULL}, + NULL, NULL, NULL, NULL}, {gftp_config_file_read_color, gftp_config_file_write_color, gftp_config_file_copy_color, gftp_config_file_compare_color, - NULL, NULL, NULL}, - {NULL, NULL, NULL, NULL, NULL, NULL}, - {NULL, NULL, NULL, NULL, NULL, NULL} + NULL, NULL, NULL, NULL}, + {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, + {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} };
--- a/lib/options.h Sun Aug 01 11:03:39 2004 +0000 +++ b/lib/options.h Tue Aug 10 01:55:53 2004 +0000 @@ -242,7 +242,7 @@ {N_("Bookmark"), bookmark_init, bookmark_register_module, "bookmark", 0, 0}, - {NULL, NULL, NULL, NULL, 0} + {NULL, NULL, NULL, NULL, 0, 0} }; GHashTable * gftp_global_options_htable = NULL,
--- a/lib/pty.c Sun Aug 01 11:03:39 2004 +0000 +++ b/lib/pty.c Tue Aug 10 01:55:53 2004 +0000 @@ -324,6 +324,7 @@ dup2 (s[1], 0); dup2 (s[1], 1); + dup2 (s[1], 2); _gftp_close_all_fds (ptysfd); execvp (args[0], args);
--- a/lib/rfc959.c Sun Aug 01 11:03:39 2004 +0000 +++ b/lib/rfc959.c Tue Aug 10 01:55:53 2004 +0000 @@ -32,7 +32,7 @@ {N_("user@host NOAUTH"), "USER %hu@%hh\nPASS %hp\n", 0}, {N_("HTTP Proxy"), "http", 0}, {N_("Custom"), "", GFTP_TEXTCOMBOEDT_EDITABLE}, - {NULL, NULL} + {NULL, NULL, 0} }; static gftp_config_vars config_vars[] =
--- a/lib/sshv2.c Sun Aug 01 11:03:39 2004 +0000 +++ b/lib/sshv2.c Tue Aug 10 01:55:53 2004 +0000 @@ -1700,7 +1700,7 @@ mode_t * mode) { gftp_file fle; - mode_t ret; + int ret; memset (&fle, 0, sizeof (fle)); ret = sshv2_send_stat_command (request, filename, &fle); @@ -2041,6 +2041,43 @@ } +static void +sshv2_copy_message (sshv2_message * src_message, sshv2_message * dest_message) +{ + dest_message->length = src_message->length; + dest_message->command = src_message->command; + dest_message->buffer = g_strdup (src_message->buffer); + dest_message->pos = dest_message->buffer + (src_message->pos - src_message->buffer); + dest_message->end = dest_message->buffer + (src_message->end - src_message->buffer); +} + + +static void +sshv2_copy_param_options (gftp_request * dest_request, + gftp_request * src_request) +{ + sshv2_params * dparms, * sparms; + + dparms = dest_request->protocol_data; + sparms = src_request->protocol_data; + + memcpy (dparms->handle, sparms->handle, sizeof (*dparms->handle)); + if (sparms->read_buffer) + dparms->read_buffer = g_strdup (sparms->read_buffer); + else + dparms->read_buffer = NULL; + + sshv2_copy_message (&sparms->message, &dparms->message); + + dparms->id = sparms->id; + dparms->count = sparms->count; + dparms->handle_len = sparms->handle_len; + dparms->initialized = sparms->initialized; + dparms->dont_log_status = sparms->dont_log_status; + dparms->offset = sparms->offset; +} + + int sshv2_init (gftp_request * request) { @@ -2050,7 +2087,7 @@ request->protonum = GFTP_SSHV2_NUM; request->init = sshv2_init; - request->copy_param_options = NULL; + request->copy_param_options = sshv2_copy_param_options; request->destroy = sshv2_destroy; request->read_function = gftp_fd_read; request->write_function = gftp_fd_write;
--- a/src/gtk/options_dialog.c Sun Aug 01 11:03:39 2004 +0000 +++ b/src/gtk/options_dialog.c Tue Aug 10 01:55:53 2004 +0000 @@ -1245,11 +1245,11 @@ gftp_option_data = _init_option_data (); #if GTK_MAJOR_VERSION == 1 - option_data->dialog = gtk_dialog_new (); - gtk_window_set_title (GTK_WINDOW (option_data->dialog), _("Options")); - gtk_container_border_width (GTK_CONTAINER (GTK_DIALOG (option_data->dialog)->action_area), 5); - gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (option_data->dialog)->action_area), 15); - gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (option_data->dialog)->action_area), TRUE); + gftp_option_data->dialog = gtk_dialog_new (); + gtk_window_set_title (GTK_WINDOW (gftp_option_data->dialog), _("Options")); + gtk_container_border_width (GTK_CONTAINER (GTK_DIALOG (gftp_option_data->dialog)->action_area), 5); + gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (gftp_option_data->dialog)->action_area), 15); + gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (gftp_option_data->dialog)->action_area), TRUE); #else gftp_option_data->dialog = gtk_dialog_new_with_buttons (_("Options"), NULL, 0, GTK_STOCK_OK,
--- a/src/uicommon/gftpui.h Sun Aug 01 11:03:39 2004 +0000 +++ b/src/uicommon/gftpui.h Tue Aug 10 01:55:53 2004 +0000 @@ -55,7 +55,7 @@ typedef struct _gftpui_common_methods { char *command; - int minlen; + size_t minlen; int (*func)(void *uidata, gftp_request * request, void *other_uidata, gftp_request * other_request, const char *command);