summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-01-24 21:00:03 (UTC)
committer zautrix <zautrix>2005-01-24 21:00:03 (UTC)
commit60733d98dff3ff5f8e95c514af258498aa7aa014 (patch) (unidiff)
tree751d6533a51790da2afa49c870ff2342d6e3b0bf
parentbb33b559609356149ae51cb50c081b3e82aecafb (diff)
downloadkdepimpi-60733d98dff3ff5f8e95c514af258498aa7aa014.zip
kdepimpi-60733d98dff3ff5f8e95c514af258498aa7aa014.tar.gz
kdepimpi-60733d98dff3ff5f8e95c514af258498aa7aa014.tar.bz2
memory leak fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt4
-rw-r--r--kmicromail/libetpan/mh/mailmh.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 42b36f1..5864ce4 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,125 +1,125 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 1.9.20 ************ 3********** VERSION 1.9.20 ************
4 4
5KO/Pi: 5KO/Pi:
6Added for the "dislplay one day" agenda mode 6Added for the "dislplay one day" agenda mode
7info in the caption and in the day lables: 7info in the caption and in the day lables:
8Now it is displayed, if the selected day is from "day before yesterday" 8Now it is displayed, if the selected day is from "day before yesterday"
9to "day after tomorrow". 9to "day after tomorrow".
10Made it possible to delete a Todo, which has sub-todos. 10Made it possible to delete a Todo, which has sub-todos.
11Fixed two small problems in the todo view. 11Fixed two small problems in the todo view.
12Added missing German translation for filter edit and print dialog. 12Added missing German translation for filter edit and print dialog.
13Made search dialog closeable by cancel key. 13Made search dialog closeable by cancel key.
14 14
15Made it possible to select in the date picker the (ligt grey ) 15Made it possible to select in the date picker the (ligt grey )
16dates of the prev./next month with the mouse. 16dates of the prev./next month with the mouse.
17 17
18OM/Pi: 18OM/Pi:
19"Delete mail" icon in main window now deletes all selected mails. 19"Delete mail" icon in main window now deletes all selected mails.
20Fixed the problem, that the state flag of imap mails was ignored. 20Fixed the problem, that the state flag of imap mails was ignored.
21Now mails with "FLAG_SEEN" on the imap server get no icon in the list view 21Now mails with "FLAG_SEEN" on the imap server get no icon in the list view
22to indecate that they are already seen. 22to indecate that they are already seen.
23Fixed the problem that the body of some mails was not displayed in the 23Fixed the problem that the body of some mails was not displayed in the
24mail viewer when fetching them from the imap server directly to read them. 24mail viewer when fetching them from the imap server directly to read them.
25Made it (configurable) possible to show the "To:" field in the list view. 25Made it (configurable) possible to show the "To:" field in the list view.
26Added to the mail viewer the option "View Source" to make it possible to see the raw mail data. 26Added to the mail viewer the option "View Source" to make it possible to see the raw mail data.
27Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the 27Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the
28local storage folder (specified in account setiings) of the account of the mail. 28local storage folder (specified in account settings) of the account of the mail.
29 29Removed some memory leaks in OM/Pi.
30 30
31 31
32********** VERSION 1.9.19 ************ 32********** VERSION 1.9.19 ************
33 33
34Added a lot of missing translations to KA/Pi, 34Added a lot of missing translations to KA/Pi,
35Added some missing translations to KO/Pi and OM/Pi. 35Added some missing translations to KO/Pi and OM/Pi.
36 36
37Fixed some minor problems in KA/Pi + KO/Pi. 37Fixed some minor problems in KA/Pi + KO/Pi.
38 38
39Fixed a crash when closing PwM/Pi. 39Fixed a crash when closing PwM/Pi.
40Added German translation for PwM/Pi. 40Added German translation for PwM/Pi.
41 41
42Made view change and Month View update faster in KO/Pi. 42Made view change and Month View update faster in KO/Pi.
43 43
44 44
45********** VERSION 1.9.18 ************ 45********** VERSION 1.9.18 ************
46 46
47FYI: The VERSION 1.9.17 was a testing release only. 47FYI: The VERSION 1.9.17 was a testing release only.
48Please read the changelog of VERSION 1.9.17 as well. 48Please read the changelog of VERSION 1.9.17 as well.
49 49
50Cleaned up the syncing config dialog. 50Cleaned up the syncing config dialog.
51Added sync config options for date range for events. 51Added sync config options for date range for events.
52Added sync config options for filters on incoming data. 52Added sync config options for filters on incoming data.
53Added sync config options for filters on outgoing data. 53Added sync config options for filters on outgoing data.
54Please read the updated SyncHowTo about the new filter settings. 54Please read the updated SyncHowTo about the new filter settings.
55These filter settings make it now possible to sync with shared 55These filter settings make it now possible to sync with shared
56calendars without writing back private or confidential data 56calendars without writing back private or confidential data
57(via the outgoing filters). 57(via the outgoing filters).
58To sync only with particular parts of a shared calendar, 58To sync only with particular parts of a shared calendar,
59the incoming filter settings can be used. 59the incoming filter settings can be used.
60An example can be found in the SyncHowTo. 60An example can be found in the SyncHowTo.
61Same for shared addressbooks. 61Same for shared addressbooks.
62 62
63Added a setting for the global kdepim data storage. 63Added a setting for the global kdepim data storage.
64Usually the data is stored in (yourhomedir/kdepim). 64Usually the data is stored in (yourhomedir/kdepim).
65Now you can set in the Global config dialog TAB, subTAB "Data storage path" 65Now you can set in the Global config dialog TAB, subTAB "Data storage path"
66a directory where all the kdepim data is stored. 66a directory where all the kdepim data is stored.
67That makes it easy to save all kdepim data on a SD card on the Z, for example. 67That makes it easy to save all kdepim data on a SD card on the Z, for example.
68 68
69KO/Pi: 69KO/Pi:
70The timeedit input has a pulldown list for times. 70The timeedit input has a pulldown list for times.
71If opened, this pulldown list should now has the right time highlighted. 71If opened, this pulldown list should now has the right time highlighted.
72Added the possibility to exclude events/todos/journals in a filter. 72Added the possibility to exclude events/todos/journals in a filter.
73You should exclude journals, if you do not want them to sync with a public calendar. 73You should exclude journals, if you do not want them to sync with a public calendar.
74 74
75KA/Pi: 75KA/Pi:
76Added the possibility to in/exclude public/private/confidential contacts to a filter. 76Added the possibility to in/exclude public/private/confidential contacts to a filter.
77If you have already defined filterrules in KA/Pi you have to adjust them all by setting the "include public/private/confidential" property manually. Sorry for that ... 77If you have already defined filterrules in KA/Pi you have to adjust them all by setting the "include public/private/confidential" property manually. Sorry for that ...
78Added printing of card view and details view on desktop. 78Added printing of card view and details view on desktop.
79Printing of list view is not working... 79Printing of list view is not working...
80Added button for removing pictures in contact editor. 80Added button for removing pictures in contact editor.
81Parsing data fix of KA/Pi version 1.9.17. 81Parsing data fix of KA/Pi version 1.9.17.
82Fixed the "parse name automatically" problem of KA/Pi version 1.9.17. 82Fixed the "parse name automatically" problem of KA/Pi version 1.9.17.
83Fixed some syncing merging problems. 83Fixed some syncing merging problems.
84 84
85 85
86********** VERSION 1.9.17 ************ 86********** VERSION 1.9.17 ************
87 87
88KO/Pi: 88KO/Pi:
89Fixed that tooltips were not updated after moving an item in agenda view. 89Fixed that tooltips were not updated after moving an item in agenda view.
90Fixed a bug in sorting start date for recurring events in list view. 90Fixed a bug in sorting start date for recurring events in list view.
91Changed the left button in todo viewer from "Agenda" to "Set completed". 91Changed the left button in todo viewer from "Agenda" to "Set completed".
92This makes it possible to change a todo in the What's Next View quickly to the completed state without leaving the What's Next View. 92This makes it possible to change a todo in the What's Next View quickly to the completed state without leaving the What's Next View.
93Added more info in the todo viewer: Startdate, parent/sub todos. 93Added more info in the todo viewer: Startdate, parent/sub todos.
94 94
95 95
96KA/Pi: 96KA/Pi:
97All fields search does now actually search all the (possible) fields, 97All fields search does now actually search all the (possible) fields,
98not only those listed in the contact list. 98not only those listed in the contact list.
99Made is possible to inline a picture in a vcard on the Z. 99Made is possible to inline a picture in a vcard on the Z.
100This was only possible on the desktop, now is it possible on the Z as well. 100This was only possible on the desktop, now is it possible on the Z as well.
101Fixed of missing save settings after filter configuration. 101Fixed of missing save settings after filter configuration.
102Made saving of addressbook much faster. 102Made saving of addressbook much faster.
103Fixed extension widget layout problem. 103Fixed extension widget layout problem.
104Fixed saving of default formatted name settings. 104Fixed saving of default formatted name settings.
105Fixed formatted name handling in edit dialog. 105Fixed formatted name handling in edit dialog.
106Added an option for changing formatted names of many contacts 106Added an option for changing formatted names of many contacts
107(menu: File - Change - Set formatted name). 107(menu: File - Change - Set formatted name).
108 108
109QWhatsThis was not working on the Z ( only black rectangle was shown). 109QWhatsThis was not working on the Z ( only black rectangle was shown).
110This is Fixed. 110This is Fixed.
111 111
112KDE-Sync: 112KDE-Sync:
113Now readonly KDE resources are synced as well. 113Now readonly KDE resources are synced as well.
114(They are not changed in KDE itself, of course). 114(They are not changed in KDE itself, of course).
115 115
116 116
117 117
118********** VERSION 1.9.16 ************ 118********** VERSION 1.9.16 ************
119 119
120KO/Pi: 120KO/Pi:
121Fixed search dialog size on Z 6000 (480x640 display). 121Fixed search dialog size on Z 6000 (480x640 display).
122Added setting to hide/show time in agenda items. 122Added setting to hide/show time in agenda items.
123Added setting to hide not running todos in todo view. 123Added setting to hide not running todos in todo view.
124Added columns for start date/time in todo view. 124Added columns for start date/time in todo view.
125Replaced the solid half-hour lines in agenda view by dot lines. 125Replaced the solid half-hour lines in agenda view by dot lines.
diff --git a/kmicromail/libetpan/mh/mailmh.c b/kmicromail/libetpan/mh/mailmh.c
index 1087ce1..2d1f26d 100644
--- a/kmicromail/libetpan/mh/mailmh.c
+++ b/kmicromail/libetpan/mh/mailmh.c
@@ -828,163 +828,166 @@ int mailmh_folder_add_message_uid(struct mailmh_folder * folder,
828 mailmh_msg_info_free(msg_info); 828 mailmh_msg_info_free(msg_info);
829 error = MAILMH_ERROR_MEMORY; 829 error = MAILMH_ERROR_MEMORY;
830 goto err; 830 goto err;
831 } 831 }
832 832
833 return MAILMH_NO_ERROR; 833 return MAILMH_NO_ERROR;
834 834
835 free: 835 free:
836 free(tmpname); 836 free(tmpname);
837 err: 837 err:
838 return error; 838 return error;
839} 839}
840 840
841int mailmh_folder_add_message(struct mailmh_folder * folder, 841int mailmh_folder_add_message(struct mailmh_folder * folder,
842 const char * message, size_t size) 842 const char * message, size_t size)
843{ 843{
844 return mailmh_folder_add_message_uid(folder, message, size, NULL); 844 return mailmh_folder_add_message_uid(folder, message, size, NULL);
845} 845}
846 846
847int mailmh_folder_add_message_file_uid(struct mailmh_folder * folder, 847int mailmh_folder_add_message_file_uid(struct mailmh_folder * folder,
848 int fd, uint32_t * pindex) 848 int fd, uint32_t * pindex)
849{ 849{
850 char * message; 850 char * message;
851 struct stat buf; 851 struct stat buf;
852 int r; 852 int r;
853 853
854#if 0 854#if 0
855 r = mailmh_folder_update(folder); 855 r = mailmh_folder_update(folder);
856 if (r != MAILMH_NO_ERROR) 856 if (r != MAILMH_NO_ERROR)
857 return r; 857 return r;
858#endif 858#endif
859 859
860 if (fstat(fd, &buf) == -1) 860 if (fstat(fd, &buf) == -1)
861 return MAILMH_ERROR_FILE; 861 return MAILMH_ERROR_FILE;
862 862
863 message = mmap(NULL, buf.st_size, PROT_READ, MAP_PRIVATE, fd, 0); 863 message = mmap(NULL, buf.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
864 if (message == MAP_FAILED) 864 if (message == MAP_FAILED)
865 return MAILMH_ERROR_FILE; 865 return MAILMH_ERROR_FILE;
866 866
867 r = mailmh_folder_add_message_uid(folder, message, buf.st_size, pindex); 867 r = mailmh_folder_add_message_uid(folder, message, buf.st_size, pindex);
868 868
869 munmap(message, buf.st_size); 869 munmap(message, buf.st_size);
870 870
871 return r; 871 return r;
872} 872}
873 873
874int mailmh_folder_add_message_file(struct mailmh_folder * folder, 874int mailmh_folder_add_message_file(struct mailmh_folder * folder,
875 int fd) 875 int fd)
876{ 876{
877 return mailmh_folder_add_message_file_uid(folder, fd, NULL); 877 return mailmh_folder_add_message_file_uid(folder, fd, NULL);
878} 878}
879 879
880int mailmh_folder_remove_message(struct mailmh_folder * folder, 880int mailmh_folder_remove_message(struct mailmh_folder * folder,
881 uint32_t index) 881 uint32_t index)
882{ 882{
883 char * filename; 883 char * filename;
884 struct mailmh_msg_info * msg_info; 884 struct mailmh_msg_info * msg_info;
885 int res; 885 int res;
886 int r; 886 int r;
887 chashdatum key; 887 chashdatum key;
888 chashdatum data; 888 chashdatum data;
889 889
890#if 0 890#if 0
891 r = mailmh_folder_update(folder); 891 r = mailmh_folder_update(folder);
892 if (r != MAILMH_NO_ERROR) { 892 if (r != MAILMH_NO_ERROR) {
893 res = r; 893 res = r;
894 goto err; 894 goto err;
895 } 895 }
896#endif 896#endif
897 897
898 r = mailmh_folder_get_message_filename(folder, index, &filename); 898 r = mailmh_folder_get_message_filename(folder, index, &filename);
899 if (filename == NULL) { 899 if (filename == NULL) {
900 res = r; 900 res = r;
901 goto err; 901 goto err;
902 } 902 }
903 903
904 if (unlink(filename) == -1) { 904 if (unlink(filename) == -1) {
905 res = MAILMH_ERROR_FILE; 905 res = MAILMH_ERROR_FILE;
906 goto free; 906 goto free;
907 } 907 }
908 908
909 key.data = &index; 909 key.data = &index;
910 key.len = sizeof(index); 910 key.len = sizeof(index);
911 r = chash_get(folder->fl_msgs_hash, &key, &data); 911 r = chash_get(folder->fl_msgs_hash, &key, &data);
912#if 0 912#if 0
913 msg_info = cinthash_find(folder->fl_msgs_hash, index); 913 msg_info = cinthash_find(folder->fl_msgs_hash, index);
914#endif 914#endif
915 if (r == 0) { 915 if (r == 0) {
916 msg_info = data.data; 916 msg_info = data.data;
917 917
918 carray_delete_fast(folder->fl_msgs_tab, msg_info->msg_array_index); 918 carray_delete_fast(folder->fl_msgs_tab, msg_info->msg_array_index);
919#if 0 919#if 0
920 cinthash_remove(folder->fl_msgs_hash, index); 920 cinthash_remove(folder->fl_msgs_hash, index);
921#endif 921#endif
922 chash_delete(folder->fl_msgs_hash, &key, NULL); 922 chash_delete(folder->fl_msgs_hash, &key, NULL);
923 } 923 }
924 // LR
925 mailmh_msg_info_free( msg_info );
926 free(filename);
924 927
925 return MAILMH_NO_ERROR; 928 return MAILMH_NO_ERROR;
926 929
927 free: 930 free:
928 free(filename); 931 free(filename);
929 err: 932 err:
930 return res; 933 return res;
931} 934}
932 935
933 936
934int mailmh_folder_move_message(struct mailmh_folder * dest_folder, 937int mailmh_folder_move_message(struct mailmh_folder * dest_folder,
935 struct mailmh_folder * src_folder, 938 struct mailmh_folder * src_folder,
936 uint32_t index) 939 uint32_t index)
937{ 940{
938 int fd; 941 int fd;
939 char * filename; 942 char * filename;
940 int r; 943 int r;
941 944
942#if 0 945#if 0
943 r = mailmh_folder_update(dest_folder); 946 r = mailmh_folder_update(dest_folder);
944 if (r != MAILMH_NO_ERROR) 947 if (r != MAILMH_NO_ERROR)
945 return r; 948 return r;
946 r = mailmh_folder_update(src_folder); 949 r = mailmh_folder_update(src_folder);
947 if (r != MAILMH_NO_ERROR) 950 if (r != MAILMH_NO_ERROR)
948 return r; 951 return r;
949#endif 952#endif
950 953
951 /* move on the same filesystem */ 954 /* move on the same filesystem */
952 r = mailmh_folder_get_message_filename(src_folder, index, &filename); 955 r = mailmh_folder_get_message_filename(src_folder, index, &filename);
953 if (r != MAILMH_NO_ERROR) 956 if (r != MAILMH_NO_ERROR)
954 return r; 957 return r;
955 958
956 r = mailmh_folder_alloc_msg(dest_folder, filename, &index); 959 r = mailmh_folder_alloc_msg(dest_folder, filename, &index);
957 free(filename); 960 free(filename);
958 if (r == MAILMH_NO_ERROR) 961 if (r == MAILMH_NO_ERROR)
959 return MAILMH_NO_ERROR; 962 return MAILMH_NO_ERROR;
960 963
961 /* move on the different filesystems */ 964 /* move on the different filesystems */
962 r = mailmh_folder_get_message_fd(src_folder, index, O_RDONLY, &fd); 965 r = mailmh_folder_get_message_fd(src_folder, index, O_RDONLY, &fd);
963 if (r != MAILMH_NO_ERROR) 966 if (r != MAILMH_NO_ERROR)
964 return r; 967 return r;
965 968
966 r = mailmh_folder_add_message_file(dest_folder, fd); 969 r = mailmh_folder_add_message_file(dest_folder, fd);
967 if (r != MAILMH_NO_ERROR) { 970 if (r != MAILMH_NO_ERROR) {
968 close(fd); 971 close(fd);
969 return r; 972 return r;
970 } 973 }
971 974
972 close(fd); 975 close(fd);
973 976
974 r = mailmh_folder_remove_message(src_folder, index); 977 r = mailmh_folder_remove_message(src_folder, index);
975 978
976 return MAILMH_NO_ERROR; 979 return MAILMH_NO_ERROR;
977} 980}
978 981
979unsigned int mailmh_folder_get_message_number(struct mailmh_folder * folder) 982unsigned int mailmh_folder_get_message_number(struct mailmh_folder * folder)
980{ 983{
981 unsigned int i; 984 unsigned int i;
982 unsigned int count; 985 unsigned int count;
983 986
984 count = 0; 987 count = 0;
985 for(i = 0 ; i < carray_count(folder->fl_msgs_tab) ; i ++) 988 for(i = 0 ; i < carray_count(folder->fl_msgs_tab) ; i ++)
986 if (carray_get(folder->fl_msgs_tab, i) != NULL) 989 if (carray_get(folder->fl_msgs_tab, i) != NULL)
987 count ++; 990 count ++;
988 991
989 return count; 992 return count;
990} 993}