summaryrefslogtreecommitdiff
path: root/src/libwpactrl/wpactrl_end.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2019-11-17 14:27:09 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2019-11-17 14:27:09 +0000
commitec17a98d42d8f90d8cbefb01943562a63f2e74d5 (patch)
tree511cbe97adce96983935c4cea14a067cc66ddce5 /src/libwpactrl/wpactrl_end.c
parent29c3282e7c73474642dc48d60ef90d79385c2a1b (diff)
downloadbcnm-ec17a98d42d8f90d8cbefb01943562a63f2e74d5.tar.xz
Actually clean up the filesystem when ending a session
This requires storing the client path in the wpactrl_t, which uses memory, GOD I HATE THAT STUPID IPC MECHANISM
Diffstat (limited to 'src/libwpactrl/wpactrl_end.c')
-rw-r--r--src/libwpactrl/wpactrl_end.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libwpactrl/wpactrl_end.c b/src/libwpactrl/wpactrl_end.c
index a14b6c8..41ea81a 100644
--- a/src/libwpactrl/wpactrl_end.c
+++ b/src/libwpactrl/wpactrl_end.c
@@ -1,14 +1,21 @@
/* ISC license. */
+#include <skalibs/posixplz.h>
#include <skalibs/stralloc.h>
#include <skalibs/djbunix.h>
+
#include <bcnm/wpactrl.h>
void wpactrl_end (wpactrl_t *a)
{
+ a->clientpath.s[a->clientpath.len - 2] = 's' ;
+ unlink_void(a->clientpath.s) ;
+ a->clientpath.s[a->clientpath.len - 2] = 'a' ;
+ unlink_void(a->clientpath.s) ;
fd_close(a->fda) ;
fd_close(a->fds) ;
stralloc_free(&a->filters) ;
stralloc_free(&a->data) ;
+ stralloc_free(&a->clientpath) ;
*a = wpactrl_zero ;
}