summaryrefslogtreecommitdiff
path: root/sharpd/sharp_zebra.c
diff options
context:
space:
mode:
Diffstat (limited to 'sharpd/sharp_zebra.c')
-rw-r--r--sharpd/sharp_zebra.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sharpd/sharp_zebra.c b/sharpd/sharp_zebra.c
index 30bf4f30e1..fde9f9f544 100644
--- a/sharpd/sharp_zebra.c
+++ b/sharpd/sharp_zebra.c
@@ -1089,3 +1089,17 @@ void sharp_zebra_init(void)
zclient->zebra_connected = zebra_connected;
zclient->zebra_buffer_write_ready = sharp_zclient_buffer_ready;
}
+
+void sharp_zebra_terminate(void)
+{
+ struct sharp_zclient *node = sharp_clients_head;
+
+ while (node) {
+ sharp_zclient_delete(node->client->session_id);
+
+ node = sharp_clients_head;
+ }
+
+ zclient_stop(zclient);
+ zclient_free(zclient);
+}