Diffstat (limited to 'kmicromail/libetpan/generic/mboxdriver_cached_message.c') (more/less context) (show whitespace changes)
-rw-r--r-- | kmicromail/libetpan/generic/mboxdriver_cached_message.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kmicromail/libetpan/generic/mboxdriver_cached_message.c b/kmicromail/libetpan/generic/mboxdriver_cached_message.c index 6d92b22..828396b 100644 --- a/kmicromail/libetpan/generic/mboxdriver_cached_message.c +++ b/kmicromail/libetpan/generic/mboxdriver_cached_message.c | |||
@@ -173,25 +173,26 @@ static int mbox_initialize(mailmessage * msg_info) | |||
173 | 173 | ||
174 | key.data = (char *) &msg_info->msg_index; | 174 | key.data = (char *) &msg_info->msg_index; |
175 | key.len = sizeof(msg_info->msg_index); | 175 | key.len = sizeof(msg_info->msg_index); |
176 | 176 | ||
177 | r = chash_get(folder->mb_hash, &key, &data); | 177 | r = chash_get(folder->mb_hash, &key, &data); |
178 | if (r < 0) { | 178 | if (r < 0) { |
179 | res = MAIL_ERROR_MSG_NOT_FOUND; | 179 | res = MAIL_ERROR_MSG_NOT_FOUND; |
180 | goto err; | 180 | goto err; |
181 | } | 181 | } |
182 | 182 | ||
183 | info = (struct mailmbox_msg_info *) data.data; | 183 | info = (struct mailmbox_msg_info *) data.data; |
184 | 184 | ||
185 | snprintf(static_uid, PATH_MAX, "%u-%u", msg_info->msg_index, info->msg_body_len); | 185 | snprintf(static_uid, PATH_MAX, "%u-%lu", |
186 | msg_info->msg_index, (unsigned long) info->msg_body_len); | ||
186 | uid = strdup(static_uid); | 187 | uid = strdup(static_uid); |
187 | if (uid == NULL) { | 188 | if (uid == NULL) { |
188 | res = MAIL_ERROR_MEMORY; | 189 | res = MAIL_ERROR_MEMORY; |
189 | goto err; | 190 | goto err; |
190 | } | 191 | } |
191 | 192 | ||
192 | r = mailmessage_generic_initialize(msg_info); | 193 | r = mailmessage_generic_initialize(msg_info); |
193 | if (r != MAIL_NO_ERROR) { | 194 | if (r != MAIL_NO_ERROR) { |
194 | free(uid); | 195 | free(uid); |
195 | res = r; | 196 | res = r; |
196 | goto err; | 197 | goto err; |
197 | } | 198 | } |