diff --git a/CHANGELOG.md b/CHANGELOG.md index 434d9726..ada64cdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ # Change Log +## [0.0.45](https://github.com/ceph-dovecot/dovecot-ceph-plugin/tree/0.0.45) (2022-11-22) +- #349 bugfix doveadm rmb return code not set + ## [0.0.44](https://github.com/ceph-dovecot/dovecot-ceph-plugin/tree/0.0.44) (2022-11-21) - #349 additional recovery method (ceph index object) diff --git a/configure.ac b/configure.ac index 01d96dc6..9c451fac 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,8 @@ AC_PREREQ([2.59]) -AC_INIT([dovecot-ceph-plugin], [0.0.44], [https://github.com/ceph-dovecot/dovecot-ceph-plugin/issues/new], ,[https://github.com/ceph-dovecot/dovecot-ceph-plugin]) +AC_INIT([dovecot-ceph-plugin], [0.0.45], [https://github.com/ceph-dovecot/dovecot-ceph-plugin/issues/new], ,[https://github.com/ceph-dovecot/dovecot-ceph-plugin]) + AC_CONFIG_AUX_DIR([.]) AC_CONFIG_SRCDIR([src]) diff --git a/rpm/dovecot-ceph-plugin.spec b/rpm/dovecot-ceph-plugin.spec index 00a660d5..2d426132 100644 --- a/rpm/dovecot-ceph-plugin.spec +++ b/rpm/dovecot-ceph-plugin.spec @@ -14,7 +14,7 @@ Name: dovecot-ceph-plugin Summary: Dovecot Ceph RADOS plugins -Version: 0.0.44 +Version: 0.0.45 Release: 0%{?dist} URL: https://github.com/ceph-dovecot/dovecot-ceph-plugin diff --git a/src/storage-rbox/doveadm-rbox-plugin.cpp b/src/storage-rbox/doveadm-rbox-plugin.cpp index 9680a2a9..fa716669 100644 --- a/src/storage-rbox/doveadm-rbox-plugin.cpp +++ b/src/storage-rbox/doveadm-rbox-plugin.cpp @@ -786,6 +786,7 @@ static int cmd_rmb_create_ceph_index_run(struct doveadm_mail_cmd_context *_ctx, int open = open_connection_load_config(&plugin); if (open < 0) { i_error("Error opening rados connection. Errorcode: %d", open); + _ctx->exit_code = open; return open; } i_info("connection to rados open"); @@ -800,11 +801,13 @@ static int cmd_rmb_create_ceph_index_run(struct doveadm_mail_cmd_context *_ctx, if (ms == nullptr) { i_error(" Error initializing metadata module"); delete ms; + _ctx->exit_code = -1; return -1; } if(rmb_cmds.remove_ceph_object_index() < 0){ i_error(" Error overwriting ceph object index"); delete ms; + _ctx->exit_code = -1; return -1; } @@ -833,6 +836,7 @@ static int cmd_rmb_create_ceph_index_run(struct doveadm_mail_cmd_context *_ctx, if(rmb_cmds.append_ceph_object_index(mail_objects) < 0){ i_error(" Error overwriting ceph object index"); delete ms; + _ctx->exit_code = -1; return -1; } mail_objects.clear(); @@ -848,11 +852,11 @@ static int cmd_rmb_create_ceph_index_run(struct doveadm_mail_cmd_context *_ctx, } i_info("found %d mails in namespace",mail_objects.size()); } - - i_info("index created"); - delete ms; } + i_info("index created"); + _ctx->exit_code = ret; + return ret; } static int iterate_list_objects(struct mail_namespace* ns, const struct mailbox_info *info, std::set &object_list){