author | zautrix <zautrix> | 2005-01-24 21:00:03 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-24 21:00:03 (UTC) |
commit | 60733d98dff3ff5f8e95c514af258498aa7aa014 (patch) (unidiff) | |
tree | 751d6533a51790da2afa49c870ff2342d6e3b0bf | |
parent | bb33b559609356149ae51cb50c081b3e82aecafb (diff) | |
download | kdepimpi-60733d98dff3ff5f8e95c514af258498aa7aa014.zip kdepimpi-60733d98dff3ff5f8e95c514af258498aa7aa014.tar.gz kdepimpi-60733d98dff3ff5f8e95c514af258498aa7aa014.tar.bz2 |
memory leak fix
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 4 | ||||
-rw-r--r-- | kmicromail/libetpan/mh/mailmh.c | 3 |
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,413 +1,413 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 1.9.20 ************ | 3 | ********** VERSION 1.9.20 ************ |
4 | 4 | ||
5 | KO/Pi: | 5 | KO/Pi: |
6 | Added for the "dislplay one day" agenda mode | 6 | Added for the "dislplay one day" agenda mode |
7 | info in the caption and in the day lables: | 7 | info in the caption and in the day lables: |
8 | Now it is displayed, if the selected day is from "day before yesterday" | 8 | Now it is displayed, if the selected day is from "day before yesterday" |
9 | to "day after tomorrow". | 9 | to "day after tomorrow". |
10 | Made it possible to delete a Todo, which has sub-todos. | 10 | Made it possible to delete a Todo, which has sub-todos. |
11 | Fixed two small problems in the todo view. | 11 | Fixed two small problems in the todo view. |
12 | Added missing German translation for filter edit and print dialog. | 12 | Added missing German translation for filter edit and print dialog. |
13 | Made search dialog closeable by cancel key. | 13 | Made search dialog closeable by cancel key. |
14 | 14 | ||
15 | Made it possible to select in the date picker the (ligt grey ) | 15 | Made it possible to select in the date picker the (ligt grey ) |
16 | dates of the prev./next month with the mouse. | 16 | dates of the prev./next month with the mouse. |
17 | 17 | ||
18 | OM/Pi: | 18 | OM/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. |
20 | Fixed the problem, that the state flag of imap mails was ignored. | 20 | Fixed the problem, that the state flag of imap mails was ignored. |
21 | Now mails with "FLAG_SEEN" on the imap server get no icon in the list view | 21 | Now mails with "FLAG_SEEN" on the imap server get no icon in the list view |
22 | to indecate that they are already seen. | 22 | to indecate that they are already seen. |
23 | Fixed the problem that the body of some mails was not displayed in the | 23 | Fixed the problem that the body of some mails was not displayed in the |
24 | mail viewer when fetching them from the imap server directly to read them. | 24 | mail viewer when fetching them from the imap server directly to read them. |
25 | Made it (configurable) possible to show the "To:" field in the list view. | 25 | Made it (configurable) possible to show the "To:" field in the list view. |
26 | Added to the mail viewer the option "View Source" to make it possible to see the raw mail data. | 26 | Added to the mail viewer the option "View Source" to make it possible to see the raw mail data. |
27 | Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the | 27 | Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the |
28 | local storage folder (specified in account setiings) of the account of the mail. | 28 | local storage folder (specified in account settings) of the account of the mail. |
29 | 29 | Removed some memory leaks in OM/Pi. | |
30 | 30 | ||
31 | 31 | ||
32 | ********** VERSION 1.9.19 ************ | 32 | ********** VERSION 1.9.19 ************ |
33 | 33 | ||
34 | Added a lot of missing translations to KA/Pi, | 34 | Added a lot of missing translations to KA/Pi, |
35 | Added some missing translations to KO/Pi and OM/Pi. | 35 | Added some missing translations to KO/Pi and OM/Pi. |
36 | 36 | ||
37 | Fixed some minor problems in KA/Pi + KO/Pi. | 37 | Fixed some minor problems in KA/Pi + KO/Pi. |
38 | 38 | ||
39 | Fixed a crash when closing PwM/Pi. | 39 | Fixed a crash when closing PwM/Pi. |
40 | Added German translation for PwM/Pi. | 40 | Added German translation for PwM/Pi. |
41 | 41 | ||
42 | Made view change and Month View update faster in KO/Pi. | 42 | Made 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 | ||
47 | FYI: The VERSION 1.9.17 was a testing release only. | 47 | FYI: The VERSION 1.9.17 was a testing release only. |
48 | Please read the changelog of VERSION 1.9.17 as well. | 48 | Please read the changelog of VERSION 1.9.17 as well. |
49 | 49 | ||
50 | Cleaned up the syncing config dialog. | 50 | Cleaned up the syncing config dialog. |
51 | Added sync config options for date range for events. | 51 | Added sync config options for date range for events. |
52 | Added sync config options for filters on incoming data. | 52 | Added sync config options for filters on incoming data. |
53 | Added sync config options for filters on outgoing data. | 53 | Added sync config options for filters on outgoing data. |
54 | Please read the updated SyncHowTo about the new filter settings. | 54 | Please read the updated SyncHowTo about the new filter settings. |
55 | These filter settings make it now possible to sync with shared | 55 | These filter settings make it now possible to sync with shared |
56 | calendars without writing back private or confidential data | 56 | calendars without writing back private or confidential data |
57 | (via the outgoing filters). | 57 | (via the outgoing filters). |
58 | To sync only with particular parts of a shared calendar, | 58 | To sync only with particular parts of a shared calendar, |
59 | the incoming filter settings can be used. | 59 | the incoming filter settings can be used. |
60 | An example can be found in the SyncHowTo. | 60 | An example can be found in the SyncHowTo. |
61 | Same for shared addressbooks. | 61 | Same for shared addressbooks. |
62 | 62 | ||
63 | Added a setting for the global kdepim data storage. | 63 | Added a setting for the global kdepim data storage. |
64 | Usually the data is stored in (yourhomedir/kdepim). | 64 | Usually the data is stored in (yourhomedir/kdepim). |
65 | Now you can set in the Global config dialog TAB, subTAB "Data storage path" | 65 | Now you can set in the Global config dialog TAB, subTAB "Data storage path" |
66 | a directory where all the kdepim data is stored. | 66 | a directory where all the kdepim data is stored. |
67 | That makes it easy to save all kdepim data on a SD card on the Z, for example. | 67 | That makes it easy to save all kdepim data on a SD card on the Z, for example. |
68 | 68 | ||
69 | KO/Pi: | 69 | KO/Pi: |
70 | The timeedit input has a pulldown list for times. | 70 | The timeedit input has a pulldown list for times. |
71 | If opened, this pulldown list should now has the right time highlighted. | 71 | If opened, this pulldown list should now has the right time highlighted. |
72 | Added the possibility to exclude events/todos/journals in a filter. | 72 | Added the possibility to exclude events/todos/journals in a filter. |
73 | You should exclude journals, if you do not want them to sync with a public calendar. | 73 | You should exclude journals, if you do not want them to sync with a public calendar. |
74 | 74 | ||
75 | KA/Pi: | 75 | KA/Pi: |
76 | Added the possibility to in/exclude public/private/confidential contacts to a filter. | 76 | Added the possibility to in/exclude public/private/confidential contacts to a filter. |
77 | If 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 ... | 77 | If 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 ... |
78 | Added printing of card view and details view on desktop. | 78 | Added printing of card view and details view on desktop. |
79 | Printing of list view is not working... | 79 | Printing of list view is not working... |
80 | Added button for removing pictures in contact editor. | 80 | Added button for removing pictures in contact editor. |
81 | Parsing data fix of KA/Pi version 1.9.17. | 81 | Parsing data fix of KA/Pi version 1.9.17. |
82 | Fixed the "parse name automatically" problem of KA/Pi version 1.9.17. | 82 | Fixed the "parse name automatically" problem of KA/Pi version 1.9.17. |
83 | Fixed some syncing merging problems. | 83 | Fixed some syncing merging problems. |
84 | 84 | ||
85 | 85 | ||
86 | ********** VERSION 1.9.17 ************ | 86 | ********** VERSION 1.9.17 ************ |
87 | 87 | ||
88 | KO/Pi: | 88 | KO/Pi: |
89 | Fixed that tooltips were not updated after moving an item in agenda view. | 89 | Fixed that tooltips were not updated after moving an item in agenda view. |
90 | Fixed a bug in sorting start date for recurring events in list view. | 90 | Fixed a bug in sorting start date for recurring events in list view. |
91 | Changed the left button in todo viewer from "Agenda" to "Set completed". | 91 | Changed the left button in todo viewer from "Agenda" to "Set completed". |
92 | This 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. | 92 | This 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. |
93 | Added more info in the todo viewer: Startdate, parent/sub todos. | 93 | Added more info in the todo viewer: Startdate, parent/sub todos. |
94 | 94 | ||
95 | 95 | ||
96 | KA/Pi: | 96 | KA/Pi: |
97 | All fields search does now actually search all the (possible) fields, | 97 | All fields search does now actually search all the (possible) fields, |
98 | not only those listed in the contact list. | 98 | not only those listed in the contact list. |
99 | Made is possible to inline a picture in a vcard on the Z. | 99 | Made is possible to inline a picture in a vcard on the Z. |
100 | This was only possible on the desktop, now is it possible on the Z as well. | 100 | This was only possible on the desktop, now is it possible on the Z as well. |
101 | Fixed of missing save settings after filter configuration. | 101 | Fixed of missing save settings after filter configuration. |
102 | Made saving of addressbook much faster. | 102 | Made saving of addressbook much faster. |
103 | Fixed extension widget layout problem. | 103 | Fixed extension widget layout problem. |
104 | Fixed saving of default formatted name settings. | 104 | Fixed saving of default formatted name settings. |
105 | Fixed formatted name handling in edit dialog. | 105 | Fixed formatted name handling in edit dialog. |
106 | Added an option for changing formatted names of many contacts | 106 | Added 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 | ||
109 | QWhatsThis was not working on the Z ( only black rectangle was shown). | 109 | QWhatsThis was not working on the Z ( only black rectangle was shown). |
110 | This is Fixed. | 110 | This is Fixed. |
111 | 111 | ||
112 | KDE-Sync: | 112 | KDE-Sync: |
113 | Now readonly KDE resources are synced as well. | 113 | Now 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 | ||
120 | KO/Pi: | 120 | KO/Pi: |
121 | Fixed search dialog size on Z 6000 (480x640 display). | 121 | Fixed search dialog size on Z 6000 (480x640 display). |
122 | Added setting to hide/show time in agenda items. | 122 | Added setting to hide/show time in agenda items. |
123 | Added setting to hide not running todos in todo view. | 123 | Added setting to hide not running todos in todo view. |
124 | Added columns for start date/time in todo view. | 124 | Added columns for start date/time in todo view. |
125 | Replaced the solid half-hour lines in agenda view by dot lines. | 125 | Replaced the solid half-hour lines in agenda view by dot lines. |
126 | Added possibility of printing the What's Next View on the desktop | 126 | Added possibility of printing the What's Next View on the desktop |
127 | (i.e. Windows and Linux). | 127 | (i.e. Windows and Linux). |
128 | Fixed a crash in KO/Pi when starting KO/Pi with What's Next view. | 128 | Fixed a crash in KO/Pi when starting KO/Pi with What's Next view. |
129 | Added tooltips in month view.(Tooltips only available on desktop) | 129 | Added tooltips in month view.(Tooltips only available on desktop) |
130 | 130 | ||
131 | Fixed a strange problem in KO/Pi alarm applet. | 131 | Fixed a strange problem in KO/Pi alarm applet. |
132 | Did not find the actual problem, | 132 | Did not find the actual problem, |
133 | such that now Qtopia reboots again if deinstalling the alarm applet. | 133 | such that now Qtopia reboots again if deinstalling the alarm applet. |
134 | But the alarm applet should work again. | 134 | But the alarm applet should work again. |
135 | 135 | ||
136 | KA/Pi: | 136 | KA/Pi: |
137 | Fixed the problem, that internal pictures were not saved. | 137 | Fixed the problem, that internal pictures were not saved. |
138 | 138 | ||
139 | Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes. | 139 | Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes. |
140 | 140 | ||
141 | Fixed some minor problems. (Like word wrap in help text windows). | 141 | Fixed some minor problems. (Like word wrap in help text windows). |
142 | 142 | ||
143 | Fixed a compiling problem in microkde/kresources. | 143 | Fixed a compiling problem in microkde/kresources. |
144 | 144 | ||
145 | KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM. | 145 | KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM. |
146 | This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9) | 146 | This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9) |
147 | such that now syncing KO/Pi with Sharp DTM should work on the | 147 | such that now syncing KO/Pi with Sharp DTM should work on the |
148 | Zaurus C 3000 model. | 148 | Zaurus C 3000 model. |
149 | 149 | ||
150 | ********** VERSION 1.9.15 ************ | 150 | ********** VERSION 1.9.15 ************ |
151 | 151 | ||
152 | Usebilty enhancements in KO/Pi: | 152 | Usebilty enhancements in KO/Pi: |
153 | When clicking on the date in a month view cell, the day view is shown. | 153 | When clicking on the date in a month view cell, the day view is shown. |
154 | Old behaviour was, that the "new event" dialog popped up. | 154 | Old behaviour was, that the "new event" dialog popped up. |
155 | 155 | ||
156 | Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). | 156 | Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). |
157 | That means, you can restore the latest | 157 | That means, you can restore the latest |
158 | event/todo/journal you have deleted. | 158 | event/todo/journal you have deleted. |
159 | A journal is deleted, if you clear all the text of the journal. | 159 | A journal is deleted, if you clear all the text of the journal. |
160 | 160 | ||
161 | Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. | 161 | Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. |
162 | 162 | ||
163 | KA/Pi starting in 480x640 resolution: | 163 | KA/Pi starting in 480x640 resolution: |
164 | Hide the filter action in toolbar | 164 | Hide the filter action in toolbar |
165 | and added icons for undo/delete/redo in toolbar. | 165 | and added icons for undo/delete/redo in toolbar. |
166 | 166 | ||
167 | Change in OM/Pi ViewMail dialog: | 167 | Change in OM/Pi ViewMail dialog: |
168 | When clicking on the "delete" icon the mail is deleted after confirmation as usual. | 168 | When clicking on the "delete" icon the mail is deleted after confirmation as usual. |
169 | But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). | 169 | But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). |
170 | 170 | ||
171 | Fixed a crash when deleting mail-accounts in OM/Pi. | 171 | Fixed a crash when deleting mail-accounts in OM/Pi. |
172 | 172 | ||
173 | 173 | ||
174 | ********** VERSION 1.9.14 ************ | 174 | ********** VERSION 1.9.14 ************ |
175 | 175 | ||
176 | Fixed some problems with the dialog sizes when switching | 176 | Fixed some problems with the dialog sizes when switching |
177 | portrait/landscape mode on 640x480 PDA display. | 177 | portrait/landscape mode on 640x480 PDA display. |
178 | 178 | ||
179 | Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. | 179 | Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. |
180 | 180 | ||
181 | Fixed an ugly bug in KOpieMail: | 181 | Fixed an ugly bug in KOpieMail: |
182 | KOpieMail was not able to write files (mails) to MSDOS file system, | 182 | KOpieMail was not able to write files (mails) to MSDOS file system, |
183 | like on an usual preformatted SD card. That should work now. | 183 | like on an usual preformatted SD card. That should work now. |
184 | To save your mail data on the Sd card do the following: | 184 | To save your mail data on the Sd card do the following: |
185 | Create a dir on the SD card: | 185 | Create a dir on the SD card: |
186 | mkdir /mnt/card/localmail | 186 | mkdir /mnt/card/localmail |
187 | Go to your home dir: | 187 | Go to your home dir: |
188 | cd | 188 | cd |
189 | Go to kopiemail data storage dir: | 189 | Go to kopiemail data storage dir: |
190 | cd kdepim/apps/kopiemail | 190 | cd kdepim/apps/kopiemail |
191 | Create a symlink to the SD card: | 191 | Create a symlink to the SD card: |
192 | ls -s /mnt/card/localmail | 192 | ls -s /mnt/card/localmail |
193 | Now KOpieMail will store all mails on the SD card. | 193 | Now KOpieMail will store all mails on the SD card. |
194 | 194 | ||
195 | KO/Pi Monthview: | 195 | KO/Pi Monthview: |
196 | Now "Go to Today" selects the current month from day 1-end, | 196 | Now "Go to Today" selects the current month from day 1-end, |
197 | not the current date + some days. | 197 | not the current date + some days. |
198 | I.e. "Go to Today" shows now always | 198 | I.e. "Go to Today" shows now always |
199 | the current month with first day of month in the first row. | 199 | the current month with first day of month in the first row. |
200 | 200 | ||
201 | Added missing German translation. | 201 | Added missing German translation. |
202 | 202 | ||
203 | Fixed icons of executeable on Wintendo. | 203 | Fixed icons of executeable on Wintendo. |
204 | 204 | ||
205 | Added a "Show next Mail" button to the OM/Pi | 205 | Added a "Show next Mail" button to the OM/Pi |
206 | mail viewer such that the mail below the current mail | 206 | mail viewer such that the mail below the current mail |
207 | in the mail list view of the current folder | 207 | in the mail list view of the current folder |
208 | can be read with a single click. | 208 | can be read with a single click. |
209 | 209 | ||
210 | 210 | ||
211 | ********** VERSION 1.9.13 ************ | 211 | ********** VERSION 1.9.13 ************ |
212 | 212 | ||
213 | Fixed nasty PwM/Pi file reading bug, when | 213 | Fixed nasty PwM/Pi file reading bug, when |
214 | the used hash algo of file is different then the global | 214 | the used hash algo of file is different then the global |
215 | hash algo. | 215 | hash algo. |
216 | 216 | ||
217 | Added KA/Pi support for opie mailit mailapplication. | 217 | Added KA/Pi support for opie mailit mailapplication. |
218 | 218 | ||
219 | Fixed some bugs in OM/Pi. | 219 | Fixed some bugs in OM/Pi. |
220 | Now character conversion tables are available for the Zaurus | 220 | Now character conversion tables are available for the Zaurus |
221 | to make OM/Pi working properly. | 221 | to make OM/Pi working properly. |
222 | To get the character conversion in OM/Pi working, please download | 222 | To get the character conversion in OM/Pi working, please download |
223 | at the sourceforge project site the package | 223 | at the sourceforge project site the package |
224 | sr-character-conversion_SharpROM_arm.ipk.zip | 224 | sr-character-conversion_SharpROM_arm.ipk.zip |
225 | (or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) | 225 | (or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) |
226 | from the section "general files for KDE/Pim" | 226 | from the section "general files for KDE/Pim" |
227 | Instructions how to install this package are in a ReadMe in this file. | 227 | Instructions how to install this package are in a ReadMe in this file. |
228 | 228 | ||
229 | 229 | ||
230 | Fixed the orientation change problem in KA/Pi when switching | 230 | Fixed the orientation change problem in KA/Pi when switching |
231 | portrait/landscape mode. | 231 | portrait/landscape mode. |
232 | 232 | ||
233 | French translation available for KA/Pi and OM/Pi. | 233 | French translation available for KA/Pi and OM/Pi. |
234 | 234 | ||
235 | Fixed some problems with categories in KO/Pi in DTM sync. | 235 | Fixed some problems with categories in KO/Pi in DTM sync. |
236 | 236 | ||
237 | Added selection dialog for export to phone in KA/Pi. | 237 | Added selection dialog for export to phone in KA/Pi. |
238 | 238 | ||
239 | If in KO/Pi is an attendee selected to add to a meeting and this | 239 | If in KO/Pi is an attendee selected to add to a meeting and this |
240 | attendee is already in the list of attendees, this person is not added | 240 | attendee is already in the list of attendees, this person is not added |
241 | again. | 241 | again. |
242 | 242 | ||
243 | Some menu cleanup in KA/Pi. | 243 | Some menu cleanup in KA/Pi. |
244 | 244 | ||
245 | ********** VERSION 1.9.12 ************ | 245 | ********** VERSION 1.9.12 ************ |
246 | 246 | ||
247 | Fix for the bug in KO/Pi What's Next view of version 1.9.11. | 247 | Fix for the bug in KO/Pi What's Next view of version 1.9.11. |
248 | 248 | ||
249 | Bugfix: Licence file is now shown again. | 249 | Bugfix: Licence file is now shown again. |
250 | 250 | ||
251 | OM/Pi now supports Unicode (utf8 charset). | 251 | OM/Pi now supports Unicode (utf8 charset). |
252 | Fixed some bugs in OM/Pi. | 252 | Fixed some bugs in OM/Pi. |
253 | 253 | ||
254 | KA/Pi has more German translation. | 254 | KA/Pi has more German translation. |
255 | 255 | ||
256 | 256 | ||
257 | ********** VERSION 1.9.11 ************ | 257 | ********** VERSION 1.9.11 ************ |
258 | 258 | ||
259 | Fixed several problems in PWM/Pi, like | 259 | Fixed several problems in PWM/Pi, like |
260 | asking the user, if unsaved changed are pending | 260 | asking the user, if unsaved changed are pending |
261 | when closing the app. | 261 | when closing the app. |
262 | And PwM/Pi handles now different texts for the | 262 | And PwM/Pi handles now different texts for the |
263 | fields Description, Username, Password, configurable per category. | 263 | fields Description, Username, Password, configurable per category. |
264 | 264 | ||
265 | Fixed a crash in KO/Pi , when importing/loading vcs files | 265 | Fixed a crash in KO/Pi , when importing/loading vcs files |
266 | which have an entry with an attendee with state: | 266 | which have an entry with an attendee with state: |
267 | NEEDS ACTION | 267 | NEEDS ACTION |
268 | 268 | ||
269 | Fixed some problems in the German translation of OM/Pi, | 269 | Fixed some problems in the German translation of OM/Pi, |
270 | which makes some dialogs not fitting on the screen | 270 | which makes some dialogs not fitting on the screen |
271 | of the Z 5500. | 271 | of the Z 5500. |
272 | 272 | ||
273 | Fixed Qtopia crash, when disabling/deinstalling | 273 | Fixed Qtopia crash, when disabling/deinstalling |
274 | KO/Pi alarm applet. | 274 | KO/Pi alarm applet. |
275 | 275 | ||
276 | Implemented direct KDE<->KA/Pi sync for KA/Pi running | 276 | Implemented direct KDE<->KA/Pi sync for KA/Pi running |
277 | on Linux desktop. | 277 | on Linux desktop. |
278 | 278 | ||
279 | Added feature "remove sync info" to sync menu. | 279 | Added feature "remove sync info" to sync menu. |
280 | 280 | ||
281 | Tweaked the KO/Pi What's next view a bit, added | 281 | Tweaked the KO/Pi What's next view a bit, added |
282 | setting to hide events that are done. | 282 | setting to hide events that are done. |
283 | 283 | ||
284 | Disabled "beam receive enabled" on startup to | 284 | Disabled "beam receive enabled" on startup to |
285 | avoid problems if Fastload is enabled. | 285 | avoid problems if Fastload is enabled. |
286 | Please set "beam receive enabled", | 286 | Please set "beam receive enabled", |
287 | if you want to receive data via IR. | 287 | if you want to receive data via IR. |
288 | 288 | ||
289 | Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running | 289 | Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running |
290 | on Linux desktop. | 290 | on Linux desktop. |
291 | 291 | ||
292 | Made in KA/Pi scrolling possible, if details view is selected. | 292 | Made in KA/Pi scrolling possible, if details view is selected. |
293 | (The keyboard focus is set automatically to the search line) | 293 | (The keyboard focus is set automatically to the search line) |
294 | 294 | ||
295 | Fixed a bug in DMT sync, that a new entry in DTM was added | 295 | Fixed a bug in DMT sync, that a new entry in DTM was added |
296 | on every sync to Kx/Pi. | 296 | on every sync to Kx/Pi. |
297 | 297 | ||
298 | Fixed missing writing of KA/Pi categories to DMT entries when syncing. | 298 | Fixed missing writing of KA/Pi categories to DMT entries when syncing. |
299 | 299 | ||
300 | Fixed a bug in DMT sync with todos created in KO/Pi containing | 300 | Fixed a bug in DMT sync with todos created in KO/Pi containing |
301 | non-latin1 characters. | 301 | non-latin1 characters. |
302 | 302 | ||
303 | Rearranged package contents of Sharp-ipks and made all | 303 | Rearranged package contents of Sharp-ipks and made all |
304 | packages installable on SD again. | 304 | packages installable on SD again. |
305 | 305 | ||
306 | Fixed the writing of addressbook data in DTM sync. | 306 | Fixed the writing of addressbook data in DTM sync. |
307 | Empty fields in KA/Pi were not removed. | 307 | Empty fields in KA/Pi were not removed. |
308 | 308 | ||
309 | Added better category handling in KA/Pi: | 309 | Added better category handling in KA/Pi: |
310 | Added item | 310 | Added item |
311 | Edit Categories and | 311 | Edit Categories and |
312 | Manage new categories | 312 | Manage new categories |
313 | to the settings menu. | 313 | to the settings menu. |
314 | Possible to configure a view to display categories. | 314 | Possible to configure a view to display categories. |
315 | 315 | ||
316 | Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu. | 316 | Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu. |
317 | 317 | ||
318 | Fixed displaying of "free" days and time in KO Monthview and Agendaview. | 318 | Fixed displaying of "free" days and time in KO Monthview and Agendaview. |
319 | 319 | ||
320 | ... and many other bugfixes. | 320 | ... and many other bugfixes. |
321 | 321 | ||
322 | ********** VERSION 1.9.10 ************ | 322 | ********** VERSION 1.9.10 ************ |
323 | 323 | ||
324 | Many internal small bugfixes. | 324 | Many internal small bugfixes. |
325 | And fix of the "big" bug in KO/Pi, | 325 | And fix of the "big" bug in KO/Pi, |
326 | that after Syncing the appointments had an offset by several hours. | 326 | that after Syncing the appointments had an offset by several hours. |
327 | That was a problem with the internal timezone setting, | 327 | That was a problem with the internal timezone setting, |
328 | introduced by the changed timezone configuration settings. | 328 | introduced by the changed timezone configuration settings. |
329 | 329 | ||
330 | German translation for OM/Pi is now available. | 330 | German translation for OM/Pi is now available. |
331 | 331 | ||
332 | 332 | ||
333 | ********** VERSION 1.9.9 ************ | 333 | ********** VERSION 1.9.9 ************ |
334 | 334 | ||
335 | KDE-Pim/Pi has a new Member! | 335 | KDE-Pim/Pi has a new Member! |
336 | It is called PWM/Pi (Passwordmanager/platform-independent) | 336 | It is called PWM/Pi (Passwordmanager/platform-independent) |
337 | and it is available for the Zaurus. | 337 | and it is available for the Zaurus. |
338 | It is planned, that it will be available later for Windows. | 338 | It is planned, that it will be available later for Windows. |
339 | (And for Linux, of course). | 339 | (And for Linux, of course). |
340 | It is a port of the Passwordmanager of KDE. | 340 | It is a port of the Passwordmanager of KDE. |
341 | It will need the MicroKDElibs to run. | 341 | It will need the MicroKDElibs to run. |
342 | 342 | ||
343 | Made loading of addressbooks in KA/Pi up to 7 times faster! | 343 | Made loading of addressbooks in KA/Pi up to 7 times faster! |
344 | The bigger your addressbook file, the more starting speed | 344 | The bigger your addressbook file, the more starting speed |
345 | will you gain. (relatively) | 345 | will you gain. (relatively) |
346 | 346 | ||
347 | The Qtopia addressbook connector is now platform independend | 347 | The Qtopia addressbook connector is now platform independend |
348 | as well and should work on any platform for importing/exporting | 348 | as well and should work on any platform for importing/exporting |
349 | Qtopia and Opie XML files. | 349 | Qtopia and Opie XML files. |
350 | 350 | ||
351 | Added a +30min feature to the timezone settings to make | 351 | Added a +30min feature to the timezone settings to make |
352 | KDE-Pim/Pi useable in Australia and other parts on the | 352 | KDE-Pim/Pi useable in Australia and other parts on the |
353 | world with strange timezones ;-) | 353 | world with strange timezones ;-) |
354 | 354 | ||
355 | German "Umlaute" should now be sorted correctly on the Z in KA/Pi. | 355 | German "Umlaute" should now be sorted correctly on the Z in KA/Pi. |
356 | 356 | ||
357 | It is now possible to disable the | 357 | It is now possible to disable the |
358 | "receive data via infrared" feature, such that syncing with | 358 | "receive data via infrared" feature, such that syncing with |
359 | Outlook is now possible again with Kx/Pi runing. | 359 | Outlook is now possible again with Kx/Pi runing. |
360 | Please disable it, before syncing Sharp DTM with Outlook. | 360 | Please disable it, before syncing Sharp DTM with Outlook. |
361 | For your convenience, the "receive data via infrared" feature | 361 | For your convenience, the "receive data via infrared" feature |
362 | is disabled automatically, if you sync Kx/Pi with DTM. | 362 | is disabled automatically, if you sync Kx/Pi with DTM. |
363 | You have to enable it again manually after syncing. | 363 | You have to enable it again manually after syncing. |
364 | Enabling this feature makes it impossible to start the | 364 | Enabling this feature makes it impossible to start the |
365 | Sharp DTM apps. If this feature is enabled, you will only get the | 365 | Sharp DTM apps. If this feature is enabled, you will only get the |
366 | alarm notification from KO/Pi and not from the Sharp calendar. | 366 | alarm notification from KO/Pi and not from the Sharp calendar. |
367 | This is very useful if you sync KO/Pi with Sharp DTM, | 367 | This is very useful if you sync KO/Pi with Sharp DTM, |
368 | because after syncing you usually would get notified about | 368 | because after syncing you usually would get notified about |
369 | an alarm by KO/Pi and the Sharp Calendar. | 369 | an alarm by KO/Pi and the Sharp Calendar. |
370 | 370 | ||
371 | Together with the Linux desktop version of KO/Pi | 371 | Together with the Linux desktop version of KO/Pi |
372 | it is now possible to sync KO/Pi on the Zaurus | 372 | it is now possible to sync KO/Pi on the Zaurus |
373 | with the complete KDE-desktop (3.3 or later) | 373 | with the complete KDE-desktop (3.3 or later) |
374 | calendar data easily. | 374 | calendar data easily. |
375 | That makes it possible to sync the Z with one | 375 | That makes it possible to sync the Z with one |
376 | click of a mouse with the KDE-Desktop. | 376 | click of a mouse with the KDE-Desktop. |
377 | This feature it available for all Zaurus platforms KO/Pi | 377 | This feature it available for all Zaurus platforms KO/Pi |
378 | is running on. | 378 | is running on. |
379 | The only thing needed is a running KO/Pi on Linux and | 379 | The only thing needed is a running KO/Pi on Linux and |
380 | a compiled version of the small | 380 | a compiled version of the small |
381 | KDE-Pim/Pi<->KDE-Desktop access command line program, | 381 | KDE-Pim/Pi<->KDE-Desktop access command line program, |
382 | which is in the KDE-Pim/Pi sources available. | 382 | which is in the KDE-Pim/Pi sources available. |
383 | 383 | ||
384 | The "KDE-desktop" syncing feature for KA/Pi will follow | 384 | The "KDE-desktop" syncing feature for KA/Pi will follow |
385 | in the next releases. | 385 | in the next releases. |
386 | 386 | ||
387 | Fixed the vcard export bug, which had the version 1.9.8. | 387 | Fixed the vcard export bug, which had the version 1.9.8. |
388 | 388 | ||
389 | Added missing GERMAN translation to KO/Pi. | 389 | Added missing GERMAN translation to KO/Pi. |
390 | Hi PsionX, could you add the missing french translation?Thx! | 390 | Hi PsionX, could you add the missing french translation?Thx! |
391 | 391 | ||
392 | Translation files for KA/Pi are available as well. | 392 | Translation files for KA/Pi are available as well. |
393 | GERMAN translation will be available in the next release. | 393 | GERMAN translation will be available in the next release. |
394 | PsionX ( yres, you again ;-) ), could you start translating | 394 | PsionX ( yres, you again ;-) ), could you start translating |
395 | KA/Pi? Thx! | 395 | KA/Pi? Thx! |
396 | 396 | ||
397 | You can download the version 1.9.9 at | 397 | You can download the version 1.9.9 at |
398 | 398 | ||
399 | http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604 | 399 | http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604 |
400 | 400 | ||
401 | Note: | 401 | Note: |
402 | To run the mail program OM/Pi you need libopenssl. | 402 | To run the mail program OM/Pi you need libopenssl. |
403 | A link to a download loaction is available at | 403 | A link to a download loaction is available at |
404 | ZSI at www.killefiz.de | 404 | ZSI at www.killefiz.de |
405 | 405 | ||
406 | 406 | ||
407 | ********** VERSION 1.9.8 ************ | 407 | ********** VERSION 1.9.8 ************ |
408 | 408 | ||
409 | Fixed character decoding in OM/Pi. | 409 | Fixed character decoding in OM/Pi. |
410 | (e.g. German "Umlaute" were not displayed properly.) | 410 | (e.g. German "Umlaute" were not displayed properly.) |
411 | 411 | ||
412 | Made is possible to reparent todos in KO/Pi. | 412 | Made is possible to reparent todos in KO/Pi. |
413 | Use contextmenu or keys (look at Help-Keys + Colors) for that. | 413 | Use contextmenu or keys (look at Help-Keys + Colors) for that. |
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 | |||
@@ -540,451 +540,454 @@ int mailmh_folder_remove_subfolder(struct mailmh_folder * folder) | |||
540 | chashdatum data; | 540 | chashdatum data; |
541 | int r; | 541 | int r; |
542 | 542 | ||
543 | parent = folder->fl_parent; | 543 | parent = folder->fl_parent; |
544 | 544 | ||
545 | key.data = folder->fl_filename; | 545 | key.data = folder->fl_filename; |
546 | key.len = strlen(folder->fl_filename); | 546 | key.len = strlen(folder->fl_filename); |
547 | 547 | ||
548 | r = chash_get(parent->fl_subfolders_hash, &key, &data); | 548 | r = chash_get(parent->fl_subfolders_hash, &key, &data); |
549 | if (r < 0) | 549 | if (r < 0) |
550 | return MAILMH_ERROR_FOLDER; | 550 | return MAILMH_ERROR_FOLDER; |
551 | 551 | ||
552 | chash_delete(parent->fl_subfolders_hash, &key, NULL); | 552 | chash_delete(parent->fl_subfolders_hash, &key, NULL); |
553 | carray_delete_fast(parent->fl_subfolders_tab, folder->fl_array_index); | 553 | carray_delete_fast(parent->fl_subfolders_tab, folder->fl_array_index); |
554 | 554 | ||
555 | mailmh_folder_free(folder); | 555 | mailmh_folder_free(folder); |
556 | 556 | ||
557 | return MAILMH_NO_ERROR; | 557 | return MAILMH_NO_ERROR; |
558 | 558 | ||
559 | } | 559 | } |
560 | 560 | ||
561 | int mailmh_folder_rename_subfolder(struct mailmh_folder * src_folder, | 561 | int mailmh_folder_rename_subfolder(struct mailmh_folder * src_folder, |
562 | struct mailmh_folder * dst_folder, | 562 | struct mailmh_folder * dst_folder, |
563 | const char * new_name) | 563 | const char * new_name) |
564 | { | 564 | { |
565 | int r; | 565 | int r; |
566 | struct mailmh_folder * folder; | 566 | struct mailmh_folder * folder; |
567 | struct mailmh_folder * parent; | 567 | struct mailmh_folder * parent; |
568 | char * new_foldername; | 568 | char * new_foldername; |
569 | 569 | ||
570 | parent = src_folder->fl_parent; | 570 | parent = src_folder->fl_parent; |
571 | if (parent == NULL) | 571 | if (parent == NULL) |
572 | return MAILMH_ERROR_RENAME; | 572 | return MAILMH_ERROR_RENAME; |
573 | 573 | ||
574 | new_foldername = malloc(strlen(dst_folder->fl_filename) + 2 + strlen(new_name)); | 574 | new_foldername = malloc(strlen(dst_folder->fl_filename) + 2 + strlen(new_name)); |
575 | if (new_foldername == NULL) | 575 | if (new_foldername == NULL) |
576 | return MAILMH_ERROR_MEMORY; | 576 | return MAILMH_ERROR_MEMORY; |
577 | 577 | ||
578 | strcpy(new_foldername, dst_folder->fl_filename); | 578 | strcpy(new_foldername, dst_folder->fl_filename); |
579 | strcat(new_foldername, MAIL_DIR_SEPARATOR_S); | 579 | strcat(new_foldername, MAIL_DIR_SEPARATOR_S); |
580 | strcat(new_foldername, new_name); | 580 | strcat(new_foldername, new_name); |
581 | 581 | ||
582 | r = rename(src_folder->fl_filename, new_foldername); | 582 | r = rename(src_folder->fl_filename, new_foldername); |
583 | free(new_foldername); | 583 | free(new_foldername); |
584 | if (r < 0) | 584 | if (r < 0) |
585 | return MAILMH_ERROR_RENAME; | 585 | return MAILMH_ERROR_RENAME; |
586 | 586 | ||
587 | r = mailmh_folder_remove_subfolder(src_folder); | 587 | r = mailmh_folder_remove_subfolder(src_folder); |
588 | if (r != MAILMH_NO_ERROR) | 588 | if (r != MAILMH_NO_ERROR) |
589 | return r; | 589 | return r; |
590 | 590 | ||
591 | folder = mailmh_folder_new(dst_folder, new_name); | 591 | folder = mailmh_folder_new(dst_folder, new_name); |
592 | if (folder == NULL) | 592 | if (folder == NULL) |
593 | return MAILMH_ERROR_MEMORY; | 593 | return MAILMH_ERROR_MEMORY; |
594 | 594 | ||
595 | r = carray_add(parent->fl_subfolders_tab, folder, NULL); | 595 | r = carray_add(parent->fl_subfolders_tab, folder, NULL); |
596 | if (r < 0) { | 596 | if (r < 0) { |
597 | mailmh_folder_free(folder); | 597 | mailmh_folder_free(folder); |
598 | return MAILMH_ERROR_MEMORY; | 598 | return MAILMH_ERROR_MEMORY; |
599 | } | 599 | } |
600 | 600 | ||
601 | return MAILMH_NO_ERROR; | 601 | return MAILMH_NO_ERROR; |
602 | } | 602 | } |
603 | 603 | ||
604 | #define MAX_TRY_ALLOC 32 | 604 | #define MAX_TRY_ALLOC 32 |
605 | 605 | ||
606 | /* initial file MUST be in the same directory */ | 606 | /* initial file MUST be in the same directory */ |
607 | 607 | ||
608 | static int mailmh_folder_alloc_msg(struct mailmh_folder * folder, | 608 | static int mailmh_folder_alloc_msg(struct mailmh_folder * folder, |
609 | char * filename, uint32_t * result) | 609 | char * filename, uint32_t * result) |
610 | { | 610 | { |
611 | uint32_t max; | 611 | uint32_t max; |
612 | uint32_t k; | 612 | uint32_t k; |
613 | char * new_filename; | 613 | char * new_filename; |
614 | size_t len; | 614 | size_t len; |
615 | struct stat f_stat; | 615 | struct stat f_stat; |
616 | 616 | ||
617 | len = strlen(folder->fl_filename) + 20; | 617 | len = strlen(folder->fl_filename) + 20; |
618 | new_filename = malloc(len); | 618 | new_filename = malloc(len); |
619 | if (new_filename == NULL) | 619 | if (new_filename == NULL) |
620 | return MAILMH_ERROR_MEMORY; | 620 | return MAILMH_ERROR_MEMORY; |
621 | 621 | ||
622 | max = folder->fl_max_index + 1; | 622 | max = folder->fl_max_index + 1; |
623 | 623 | ||
624 | //fprintf(stderr,"mailmh_folder_alloc_msg filename: %s \n", filename); | 624 | //fprintf(stderr,"mailmh_folder_alloc_msg filename: %s \n", filename); |
625 | k = 0; | 625 | k = 0; |
626 | while (k < MAX_TRY_ALLOC) { | 626 | while (k < MAX_TRY_ALLOC) { |
627 | snprintf(new_filename, len, "%s%c%lu", folder->fl_filename, | 627 | snprintf(new_filename, len, "%s%c%lu", folder->fl_filename, |
628 | MAIL_DIR_SEPARATOR, (unsigned long) (max + k)); | 628 | MAIL_DIR_SEPARATOR, (unsigned long) (max + k)); |
629 | //fprintf(stderr,"mailmh_folder_alloc_msg new_filename: %s \n", new_filename); | 629 | //fprintf(stderr,"mailmh_folder_alloc_msg new_filename: %s \n", new_filename); |
630 | if ( stat( new_filename, &f_stat ) == -1 ) { | 630 | if ( stat( new_filename, &f_stat ) == -1 ) { |
631 | // if (link(filename, new_filename) == 0) { | 631 | // if (link(filename, new_filename) == 0) { |
632 | int r; | 632 | int r; |
633 | //fprintf(stderr,"filename found \n"); | 633 | //fprintf(stderr,"filename found \n"); |
634 | //unlink(filename); | 634 | //unlink(filename); |
635 | rename (filename,new_filename ); | 635 | rename (filename,new_filename ); |
636 | free(new_filename); | 636 | free(new_filename); |
637 | 637 | ||
638 | if (k > MAX_TRY_ALLOC / 2) { | 638 | if (k > MAX_TRY_ALLOC / 2) { |
639 | r = mailmh_folder_update(folder); | 639 | r = mailmh_folder_update(folder); |
640 | /* ignore errors */ | 640 | /* ignore errors */ |
641 | } | 641 | } |
642 | 642 | ||
643 | * result = max + k; | 643 | * result = max + k; |
644 | 644 | ||
645 | folder->fl_max_index = max + k; | 645 | folder->fl_max_index = max + k; |
646 | 646 | ||
647 | return MAILMH_NO_ERROR; | 647 | return MAILMH_NO_ERROR; |
648 | } | 648 | } |
649 | else if (errno == EXDEV) { | 649 | else if (errno == EXDEV) { |
650 | free(filename); | 650 | free(filename); |
651 | return MAILMH_ERROR_FOLDER; | 651 | return MAILMH_ERROR_FOLDER; |
652 | } | 652 | } |
653 | k ++; | 653 | k ++; |
654 | } | 654 | } |
655 | 655 | ||
656 | free(new_filename); | 656 | free(new_filename); |
657 | 657 | ||
658 | return MAILMH_ERROR_FOLDER; | 658 | return MAILMH_ERROR_FOLDER; |
659 | } | 659 | } |
660 | 660 | ||
661 | int mailmh_folder_get_message_filename(struct mailmh_folder * folder, | 661 | int mailmh_folder_get_message_filename(struct mailmh_folder * folder, |
662 | uint32_t index, char ** result) | 662 | uint32_t index, char ** result) |
663 | { | 663 | { |
664 | char * filename; | 664 | char * filename; |
665 | int len; | 665 | int len; |
666 | 666 | ||
667 | #if 0 | 667 | #if 0 |
668 | r = mailmh_folder_update(folder); | 668 | r = mailmh_folder_update(folder); |
669 | if (r != MAILMH_NO_ERROR) | 669 | if (r != MAILMH_NO_ERROR) |
670 | return r; | 670 | return r; |
671 | #endif | 671 | #endif |
672 | 672 | ||
673 | len = strlen(folder->fl_filename) + 20; | 673 | len = strlen(folder->fl_filename) + 20; |
674 | filename = malloc(len); | 674 | filename = malloc(len); |
675 | if (filename == NULL) | 675 | if (filename == NULL) |
676 | return MAILMH_ERROR_MEMORY; | 676 | return MAILMH_ERROR_MEMORY; |
677 | 677 | ||
678 | snprintf(filename, len, "%s%c%lu", folder->fl_filename, MAIL_DIR_SEPARATOR, | 678 | snprintf(filename, len, "%s%c%lu", folder->fl_filename, MAIL_DIR_SEPARATOR, |
679 | (unsigned long) index); | 679 | (unsigned long) index); |
680 | 680 | ||
681 | * result = filename; | 681 | * result = filename; |
682 | 682 | ||
683 | return MAILMH_NO_ERROR;; | 683 | return MAILMH_NO_ERROR;; |
684 | } | 684 | } |
685 | 685 | ||
686 | 686 | ||
687 | int mailmh_folder_get_message_fd(struct mailmh_folder * folder, | 687 | int mailmh_folder_get_message_fd(struct mailmh_folder * folder, |
688 | uint32_t index, int flags, int * result) | 688 | uint32_t index, int flags, int * result) |
689 | { | 689 | { |
690 | char * filename; | 690 | char * filename; |
691 | int fd; | 691 | int fd; |
692 | int r; | 692 | int r; |
693 | 693 | ||
694 | #if 0 | 694 | #if 0 |
695 | r = mailmh_folder_update(folder); | 695 | r = mailmh_folder_update(folder); |
696 | if (r != MAILMH_NO_ERROR) | 696 | if (r != MAILMH_NO_ERROR) |
697 | return r; | 697 | return r; |
698 | #endif | 698 | #endif |
699 | 699 | ||
700 | r = mailmh_folder_get_message_filename(folder, index, &filename); | 700 | r = mailmh_folder_get_message_filename(folder, index, &filename); |
701 | if (r != MAILMH_NO_ERROR) | 701 | if (r != MAILMH_NO_ERROR) |
702 | return r; | 702 | return r; |
703 | 703 | ||
704 | fd = open(filename, flags); | 704 | fd = open(filename, flags); |
705 | free(filename); | 705 | free(filename); |
706 | if (fd == -1) | 706 | if (fd == -1) |
707 | return MAILMH_ERROR_MSG_NOT_FOUND; | 707 | return MAILMH_ERROR_MSG_NOT_FOUND; |
708 | 708 | ||
709 | * result = fd; | 709 | * result = fd; |
710 | 710 | ||
711 | return MAILMH_NO_ERROR; | 711 | return MAILMH_NO_ERROR; |
712 | } | 712 | } |
713 | 713 | ||
714 | int mailmh_folder_get_message_size(struct mailmh_folder * folder, | 714 | int mailmh_folder_get_message_size(struct mailmh_folder * folder, |
715 | uint32_t index, size_t * result) | 715 | uint32_t index, size_t * result) |
716 | { | 716 | { |
717 | int r; | 717 | int r; |
718 | char * filename; | 718 | char * filename; |
719 | struct stat buf; | 719 | struct stat buf; |
720 | 720 | ||
721 | r = mailmh_folder_get_message_filename(folder, index, &filename); | 721 | r = mailmh_folder_get_message_filename(folder, index, &filename); |
722 | if (r != MAILMH_NO_ERROR) | 722 | if (r != MAILMH_NO_ERROR) |
723 | return r; | 723 | return r; |
724 | 724 | ||
725 | r = stat(filename, &buf); | 725 | r = stat(filename, &buf); |
726 | free(filename); | 726 | free(filename); |
727 | if (r < 0) | 727 | if (r < 0) |
728 | return MAILMH_ERROR_FILE; | 728 | return MAILMH_ERROR_FILE; |
729 | 729 | ||
730 | * result = buf.st_size; | 730 | * result = buf.st_size; |
731 | 731 | ||
732 | return MAILMH_NO_ERROR; | 732 | return MAILMH_NO_ERROR; |
733 | } | 733 | } |
734 | 734 | ||
735 | int mailmh_folder_add_message_uid(struct mailmh_folder * folder, | 735 | int mailmh_folder_add_message_uid(struct mailmh_folder * folder, |
736 | const char * message, size_t size, | 736 | const char * message, size_t size, |
737 | uint32_t * pindex) | 737 | uint32_t * pindex) |
738 | { | 738 | { |
739 | char * tmpname; | 739 | char * tmpname; |
740 | int fd; | 740 | int fd; |
741 | size_t namesize; | 741 | size_t namesize; |
742 | size_t left; | 742 | size_t left; |
743 | ssize_t res; | 743 | ssize_t res; |
744 | struct mailmh_msg_info * msg_info; | 744 | struct mailmh_msg_info * msg_info; |
745 | uint32_t index; | 745 | uint32_t index; |
746 | int error; | 746 | int error; |
747 | int r; | 747 | int r; |
748 | unsigned int array_index; | 748 | unsigned int array_index; |
749 | struct stat buf; | 749 | struct stat buf; |
750 | chashdatum key; | 750 | chashdatum key; |
751 | chashdatum data; | 751 | chashdatum data; |
752 | 752 | ||
753 | #if 0 | 753 | #if 0 |
754 | r = mailmh_folder_update(folder); | 754 | r = mailmh_folder_update(folder); |
755 | if (r != MAILMH_NO_ERROR) { | 755 | if (r != MAILMH_NO_ERROR) { |
756 | error = r; | 756 | error = r; |
757 | goto err; | 757 | goto err; |
758 | } | 758 | } |
759 | #endif | 759 | #endif |
760 | 760 | ||
761 | namesize = strlen(folder->fl_filename) + 20; | 761 | namesize = strlen(folder->fl_filename) + 20; |
762 | tmpname = malloc(namesize); | 762 | tmpname = malloc(namesize); |
763 | snprintf(tmpname, namesize, "%s%ctmpXXXXXX", | 763 | snprintf(tmpname, namesize, "%s%ctmpXXXXXX", |
764 | folder->fl_filename, MAIL_DIR_SEPARATOR); | 764 | folder->fl_filename, MAIL_DIR_SEPARATOR); |
765 | fd = mkstemp(tmpname); | 765 | fd = mkstemp(tmpname); |
766 | if (fd < 0) { | 766 | if (fd < 0) { |
767 | error = MAILMH_ERROR_FILE; | 767 | error = MAILMH_ERROR_FILE; |
768 | goto free; | 768 | goto free; |
769 | } | 769 | } |
770 | 770 | ||
771 | left = size; | 771 | left = size; |
772 | while (left > 0) { | 772 | while (left > 0) { |
773 | res = write(fd, message, left); | 773 | res = write(fd, message, left); |
774 | if (res == -1) { | 774 | if (res == -1) { |
775 | close(fd); | 775 | close(fd); |
776 | error = MAILMH_ERROR_FILE; | 776 | error = MAILMH_ERROR_FILE; |
777 | goto free; | 777 | goto free; |
778 | } | 778 | } |
779 | 779 | ||
780 | left -= res; | 780 | left -= res; |
781 | } | 781 | } |
782 | close(fd); | 782 | close(fd); |
783 | 783 | ||
784 | r = stat(tmpname, &buf); | 784 | r = stat(tmpname, &buf); |
785 | if (r < 0) { | 785 | if (r < 0) { |
786 | error = MAILMH_ERROR_FILE; | 786 | error = MAILMH_ERROR_FILE; |
787 | goto free; | 787 | goto free; |
788 | } | 788 | } |
789 | 789 | ||
790 | r = mailmh_folder_alloc_msg(folder, tmpname, &index); | 790 | r = mailmh_folder_alloc_msg(folder, tmpname, &index); |
791 | if (r != MAILMH_NO_ERROR) { | 791 | if (r != MAILMH_NO_ERROR) { |
792 | unlink(tmpname); | 792 | unlink(tmpname); |
793 | error = MAILMH_ERROR_COULD_NOT_ALLOC_MSG; | 793 | error = MAILMH_ERROR_COULD_NOT_ALLOC_MSG; |
794 | goto free; | 794 | goto free; |
795 | } | 795 | } |
796 | free(tmpname); | 796 | free(tmpname); |
797 | 797 | ||
798 | msg_info = mailmh_msg_info_new(index, size, buf.st_mtime); | 798 | msg_info = mailmh_msg_info_new(index, size, buf.st_mtime); |
799 | if (msg_info == NULL) { | 799 | if (msg_info == NULL) { |
800 | mailmh_folder_remove_message(folder, index); | 800 | mailmh_folder_remove_message(folder, index); |
801 | error = MAILMH_ERROR_MEMORY; | 801 | error = MAILMH_ERROR_MEMORY; |
802 | goto err; | 802 | goto err; |
803 | } | 803 | } |
804 | 804 | ||
805 | r = carray_add(folder->fl_msgs_tab, msg_info, &array_index); | 805 | r = carray_add(folder->fl_msgs_tab, msg_info, &array_index); |
806 | if (r < 0) { | 806 | if (r < 0) { |
807 | mailmh_folder_remove_message(folder, index); | 807 | mailmh_folder_remove_message(folder, index); |
808 | mailmh_msg_info_free(msg_info); | 808 | mailmh_msg_info_free(msg_info); |
809 | error = MAILMH_ERROR_MEMORY; | 809 | error = MAILMH_ERROR_MEMORY; |
810 | goto err; | 810 | goto err; |
811 | } | 811 | } |
812 | msg_info->msg_array_index = array_index; | 812 | msg_info->msg_array_index = array_index; |
813 | 813 | ||
814 | #if 0 | 814 | #if 0 |
815 | r = cinthash_add(folder->fl_msgs_hash, index, msg_info); | 815 | r = cinthash_add(folder->fl_msgs_hash, index, msg_info); |
816 | #endif | 816 | #endif |
817 | key.data = &index; | 817 | key.data = &index; |
818 | key.len = sizeof(index); | 818 | key.len = sizeof(index); |
819 | data.data = msg_info; | 819 | data.data = msg_info; |
820 | data.len = 0; | 820 | data.len = 0; |
821 | 821 | ||
822 | if (pindex != NULL) | 822 | if (pindex != NULL) |
823 | * pindex = index; | 823 | * pindex = index; |
824 | 824 | ||
825 | r = chash_set(folder->fl_msgs_hash, &key, &data, NULL); | 825 | r = chash_set(folder->fl_msgs_hash, &key, &data, NULL); |
826 | if (r < 0) { | 826 | if (r < 0) { |
827 | carray_delete_fast(folder->fl_msgs_tab, msg_info->msg_array_index); | 827 | carray_delete_fast(folder->fl_msgs_tab, msg_info->msg_array_index); |
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 | ||
841 | int mailmh_folder_add_message(struct mailmh_folder * folder, | 841 | int 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 | ||
847 | int mailmh_folder_add_message_file_uid(struct mailmh_folder * folder, | 847 | int 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 | ||
874 | int mailmh_folder_add_message_file(struct mailmh_folder * folder, | 874 | int 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 | ||
880 | int mailmh_folder_remove_message(struct mailmh_folder * folder, | 880 | int 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 | ||
934 | int mailmh_folder_move_message(struct mailmh_folder * dest_folder, | 937 | int 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 | ||
979 | unsigned int mailmh_folder_get_message_number(struct mailmh_folder * folder) | 982 | unsigned 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 | } |