* src/send_message.c
authorAlfons Hoogervorst <alfons@proteus.demon.nl>
Sun, 30 Mar 2003 00:53:41 +0000 (00:53 +0000)
committerAlfons Hoogervorst <alfons@proteus.demon.nl>
Sun, 30 Mar 2003 00:53:41 +0000 (00:53 +0000)
try fixing crashes when sending messages: my gcc 2.95.4 seems
to generate bad code for 'send_send_data_progressive': When
called from 'send_send_data_finished', the 'data' pointer is
cleared just before the assignment to the dialog pointer

ChangeLog.claws
configure.ac
src/send_message.c

index 3c81130..cf7619f 100644 (file)
@@ -1,3 +1,11 @@
+2003-03-30 [alfons]    0.8.11claws65
+
+       * src/send_message.c
+               try fixing crashes when sending messages: my gcc 2.95.4 seems 
+               to generate bad code for 'send_send_data_progressive': When
+               called from 'send_send_data_finished', the 'data' pointer is
+               cleared just before the assignment to the dialog pointer
+
 2003-03-29 [christoph] 0.8.11claws64
 
        * src/common/prefs.h
index 4041657..2c11053 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=11
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws64
+EXTRA_VERSION=claws65
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index fa72c59..7d83c1d 100644 (file)
@@ -489,13 +489,19 @@ static gint send_send_data_progressive(Session *session, guint cur_len,
        progress_dialog_set_label(dialog->dialog, buf);
        progress_dialog_set_percentage
                (dialog->dialog, (gfloat)cur_len / (gfloat)total_len);
-
        return 0;
 }
 
 static gint send_send_data_finished(Session *session, guint len, gpointer data)
 {
-       send_send_data_progressive(session, len, len, data);
+       SendProgressDialog *dialog = (SendProgressDialog *)data;
+       gchar buf[BUFFSIZE];
+       
+       g_snprintf(buf, sizeof(buf), _("Sending message (%d / %d bytes)"),
+                  len, len);
+       progress_dialog_set_label(dialog->dialog, buf);
+       progress_dialog_set_percentage
+               (dialog->dialog, (gfloat)len / (gfloat)len);
        return 0;
 }