-rw-r--r-- | kmicromail/libetpan/mh/mailmh.c | 3 |
1 files changed, 3 insertions, 0 deletions
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 | |||
@@ -900,48 +900,51 @@ int mailmh_folder_remove_message(struct mailmh_folder * folder, | |||
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) |