From 09a267fcda7adf5b0667627d5a7500cbfbec08ac Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Wed, 13 Jun 2018 08:29:46 +0200 Subject: [PATCH] lib: document the inability to do anything else when processing notifications The code doesn't handle notifications with regular operations on the same connection. Tell the user to open a another connection. --- src/lib/lldpctl.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/lldpctl.h b/src/lib/lldpctl.h index bb996d9e..45b29f7d 100644 --- a/src/lib/lldpctl.h +++ b/src/lib/lldpctl.h @@ -489,6 +489,9 @@ typedef void (*lldpctl_change_callback)(lldpctl_conn_t *conn, * This function will register the necessity to push neighbor changes to lldpd * and therefore will issue IO operations. The error code could then be @c * LLDPCTL_ERR_WOULDBLOCK. + * + * Once a callback is registered, the connection shouldn't be used for anything + * else than receiving notifications. */ int lldpctl_watch_callback(lldpctl_conn_t *conn, lldpctl_change_callback cb, -- 2.39.5