From fc1b008e081429101d5d3bb878ddb417c0d2be12 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 5 Sep 2013 14:25:51 +0200 Subject: [PATCH] uci: expose rpc_uci_purge_savedirs() helper --- include/rpcd/uci.h | 2 ++ uci.c | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/rpcd/uci.h b/include/rpcd/uci.h index a4f79e2..7a169f2 100644 --- a/include/rpcd/uci.h +++ b/include/rpcd/uci.h @@ -32,4 +32,6 @@ int rpc_uci_api_init(struct ubus_context *ctx); +void rpc_uci_purge_savedirs(void); + #endif diff --git a/uci.c b/uci.c index 3fd187d..0fede86 100644 --- a/uci.c +++ b/uci.c @@ -1159,8 +1159,7 @@ rpc_uci_purge_savedir_cb(struct rpc_session *ses, void *priv) * Removes all delta directories which match the /tmp/.uci-rpc-* pattern. * This is used to clean up garbage when starting rpcd. */ -static void -rpc_uci_purge_savedirs(void) +void rpc_uci_purge_savedirs(void) { int i; glob_t gl; @@ -1208,7 +1207,6 @@ int rpc_uci_api_init(struct ubus_context *ctx) if (!cursor) return UBUS_STATUS_UNKNOWN_ERROR; - rpc_uci_purge_savedirs(); rpc_session_destroy_cb(&cb); return ubus_add_object(ctx, &obj); -- 2.30.2