From 0823602ddc0d361fe5c3921bd9b8142054fe7f86 Mon Sep 17 00:00:00 2001 From: Melvin Hadasht Date: Sat, 3 Aug 2002 18:36:40 +0000 Subject: [PATCH] src/prefs_actions.c removed unnecessary checks for NULL introduced in 0.8.1claws11. src/messageview.c fixed bug where the Return Receipt was sent to Delivery-Notification-To address even if it was not present --- ChangeLog.claws | 8 +++++ configure.in | 2 +- src/messageview.c | 2 +- src/prefs_actions.c | 79 ++++++++++++++++++--------------------------- 4 files changed, 42 insertions(+), 49 deletions(-) diff --git a/ChangeLog.claws b/ChangeLog.claws index 77f5fdac8..a50b314db 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,11 @@ +2002-08-03 [melvin] 0.8.1claws12 + + * src/prefs_actions.c + removed unnecessary checks for NULL introduced in 0.8.1claws11. + * src/messageview.c + fixed bug where the Return Receipt was sent to + Delivery-Notification-To address even if it was not present + 2002-08-02 [alfons] 0.8.1claws11 * src/prefs_actions.c diff --git a/configure.in b/configure.in index ee3d7cb7a..383ac18f7 100644 --- a/configure.in +++ b/configure.in @@ -8,7 +8,7 @@ MINOR_VERSION=8 MICRO_VERSION=1 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=claws11 +EXTRA_VERSION=claws12 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION dnl set $target diff --git a/src/messageview.c b/src/messageview.c index 8c81c71c8..e31cb11c5 100644 --- a/src/messageview.c +++ b/src/messageview.c @@ -339,7 +339,7 @@ static gint disposition_notification_send(MsgInfo * msginfo) return -1; } - to_list = address_list_append(NULL, msginfo->dispositionnotificationto); + to_list = address_list_append(NULL, to); ok = send_message(tmp, cur_account, to_list); if (ok < 0) { diff --git a/src/prefs_actions.c b/src/prefs_actions.c index 11338ef3e..d8970a395 100644 --- a/src/prefs_actions.c +++ b/src/prefs_actions.c @@ -1205,13 +1205,12 @@ static gboolean execute_actions(gchar *action, GtkWidget *window, for (cur = children_list; cur; cur = cur->next) { child_info = (ChildInfo *) cur->data; - if (child_info) - child_info->tag_status = - gdk_input_add(child_info->chld_status, - GDK_INPUT_READ, - catch_status, child_info); + child_info->tag_status = + gdk_input_add(child_info->chld_status, + GDK_INPUT_READ, + catch_status, child_info); } - + create_io_dialog(children); } @@ -1415,15 +1414,11 @@ static void kill_children_cb(GtkWidget *widget, gpointer data) Children *children = (Children *) data; ChildInfo *child_info; - g_return_if_fail(data); - for (cur = children->list; cur; cur = cur->next) { - child_info = (ChildInfo *) (cur->data); - if (child_info) { - debug_print(_("Killing child group id %d\n"), child_info->pid); - if (child_info->pid && kill(-child_info->pid, SIGTERM) < 0) - perror("kill"); - } + child_info = (ChildInfo *)(cur->data); + debug_print(_("Killing child group id %d\n"), child_info->pid); + if (child_info->pid && kill(-child_info->pid, SIGTERM) < 0) + perror("kill"); } } @@ -1441,11 +1436,9 @@ static gint wait_for_children(gpointer data) new_output = FALSE; while (cur) { child_info = (ChildInfo *)cur->data; - if (child_info) { - if (child_info->pid) - children->nb++; - new_output |= child_info->new_out; - } + if (child_info->pid) + children->nb++; + new_output |= child_info->new_out; cur = cur->next; } @@ -1488,8 +1481,6 @@ static void hide_io_dialog_cb(GtkWidget *w, gpointer data) Children *children = (Children *)data; - g_return_if_fail(children); - if (!children->nb) { gtk_signal_disconnect_by_data(GTK_OBJECT(children->dialog), children); @@ -1522,15 +1513,11 @@ static void free_children(Children *children) g_free(children->action); for (cur = children->list; cur;) { child_info = (ChildInfo *)cur->data; - if (child_info) { - g_free(child_info->cmd); - g_string_free(child_info->output, TRUE); - children->list = g_slist_remove(children->list, child_info); - g_free(child_info); - cur = children->list; - } else { - break; /* ??? */ - } + g_free(child_info->cmd); + g_string_free(child_info->output, TRUE); + children->list = g_slist_remove(children->list, child_info); + g_free(child_info); + cur = children->list; } g_free(children); } @@ -1560,23 +1547,21 @@ static void update_io_dialog(Children *children) gtk_text_get_length(GTK_TEXT(text))); for (cur = children->list; cur; cur = cur->next) { child_info = (ChildInfo *)cur->data; - if (child_info) { - if (child_info->pid) - caption = g_strdup_printf - (_("--- Running: %s\n"), - child_info->cmd); - else - caption = g_strdup_printf - (_("--- Ended: %s\n"), - child_info->cmd); - - gtk_text_insert(GTK_TEXT(text), NULL, NULL, NULL, - caption, -1); - gtk_text_insert(GTK_TEXT(text), NULL, NULL, NULL, - child_info->output->str, -1); - g_free(caption); - child_info->new_out = FALSE; - } + if (child_info->pid) + caption = g_strdup_printf + (_("--- Running: %s\n"), + child_info->cmd); + else + caption = g_strdup_printf + (_("--- Ended: %s\n"), + child_info->cmd); + + gtk_text_insert(GTK_TEXT(text), NULL, NULL, NULL, + caption, -1); + gtk_text_insert(GTK_TEXT(text), NULL, NULL, NULL, + child_info->output->str, -1); + g_free(caption); + child_info->new_out = FALSE; } gtk_text_thaw(GTK_TEXT(text)); } -- 2.25.1