* 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 3c811302b989e665db2ab3e0dab62759adda8eab..cf7619fe951ecb9380bcc0a25d737fa76bb7abe7 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
 2003-03-29 [christoph] 0.8.11claws64
 
        * src/common/prefs.h
index 4041657cf1c840b86300edeb8bd3b903e4d8bd0f..2c11053b024823b9f74952dd558d0b6128154b81 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=11
 INTERFACE_AGE=0
 BINARY_AGE=0
 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
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index fa72c5907e2676ec1525fd67a717510875baaba7..7d83c1dd1b51bb1e42e97dd93292a975fa4df49a 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);
        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)
 {
        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;
 }
 
        return 0;
 }