From: Jo-Philipp Wich Date: Thu, 5 Sep 2013 12:25:51 +0000 (+0200) Subject: uci: expose rpc_uci_purge_savedirs() helper X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=fc1b008e081429101d5d3bb878ddb417c0d2be12;p=project%2Frpcd.git uci: expose rpc_uci_purge_savedirs() helper --- 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);