Skip to content

Commit

Permalink
Cleanup device backend cache on exit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco van Wieringen committed Dec 23, 2014
1 parent d8e191b commit a1431d3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/stored/btape.c
Expand Up @@ -340,6 +340,10 @@ static void terminate_btape(int status)
dev->term();
}

#if defined(HAVE_DYNAMIC_SD_BACKENDS)
dev_flush_backends();
#endif

if (configfile) {
free(configfile);
}
Expand Down
4 changes: 0 additions & 4 deletions src/stored/protos.h
Expand Up @@ -240,10 +240,6 @@ extern int reservations_lock_count;
#define unlock_volumes() _unlock_volumes()
#endif

/* sd_backends.c */
DEVICE *init_backend_dev(JCR *jcr, int device_type);
void dev_flush_backends();

/* sd_backends.c */
#if defined(HAVE_DYNAMIC_SD_BACKENDS)
void sd_set_backend_dirs(alist *new_backend_dirs);
Expand Down
4 changes: 4 additions & 0 deletions src/stored/stored.c
Expand Up @@ -739,6 +739,10 @@ void terminate_stored(int sig)
}
}

#if defined(HAVE_DYNAMIC_SD_BACKENDS)
dev_flush_backends();
#endif

if (configfile) {
free(configfile);
configfile = NULL;
Expand Down

0 comments on commit a1431d3

Please sign in to comment.