summaryrefslogtreecommitdiffstats
path: root/xlators/features/changetimerecorder/src/changetimerecorder.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/changetimerecorder/src/changetimerecorder.c')
-rw-r--r--xlators/features/changetimerecorder/src/changetimerecorder.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/xlators/features/changetimerecorder/src/changetimerecorder.c b/xlators/features/changetimerecorder/src/changetimerecorder.c
index 574b627a825..1811cec420f 100644
--- a/xlators/features/changetimerecorder/src/changetimerecorder.c
+++ b/xlators/features/changetimerecorder/src/changetimerecorder.c
@@ -2297,6 +2297,32 @@ out:
return 0;
}
+int
+notify (xlator_t *this, int event, void *data, ...)
+{
+
+ gf_ctr_private_t *priv = NULL;
+ int ret = 0;
+
+ priv = this->private;
+
+ if (!priv)
+ goto out;
+
+ if (event == GF_EVENT_CLEANUP) {
+ if (fini_db (priv->_db_conn)) {
+ gf_msg (this->name, GF_LOG_WARNING, 0,
+ CTR_MSG_CLOSE_DB_CONN_FAILED, "Failed closing "
+ "db connection");
+ }
+ } else {
+ ret = default_notify (this, event, data);
+ }
+out:
+ return ret;
+
+}
+
int32_t
mem_acct_init (xlator_t *this)
{