gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

patch for gsm-sms.c, corrects deleting of messages in xgnokii


From: Ulrich Hopp
Subject: patch for gsm-sms.c, corrects deleting of messages in xgnokii
Date: Sun, 19 Jan 2003 20:46:00 +0100
User-agent: KMail/1.4.3

Hi,

gnokii : latest version from CVS 0.5.0pre (19.01.2003)
Phone : Nokia 6310 V 4.10 04-01-02 NPE-4
Cabel : DLR3-3P
System SuSE 8.1 ( ftp update )

in my first patch I put  "data->folder_stats[folder]->used--;"  into the wrong 
line. Changing the boundary  of a loop inside the loop is not very wise ;-)

Now deleting of messages in xgnokii works for me fine.


regards
Uli

--- gsm-sms.c.orig      2003-01-19 20:23:07.000000000 +0100
+++ gsm-sms.c   2003-01-19 20:34:05.000000000 +0100
@@ -804,10 +804,10 @@
                        dprintf("Found deleted message, which will now be 
freed! %i , %i\n",
                                        i, 
data->message_list[i][folder]->location);
                        for (j = i; j < data->folder_stats[folder]->used; j++) {
-                               data->folder_stats[folder]->used--;
                                memcpy(data->message_list[j][folder], 
data->message_list[j + 1][folder],
                                                sizeof(gn_sms_message_list));
                        }
+                       data->folder_stats[folder]->used--;
                        i--;
                }
        }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]