Am 08.09.21 um 00:31 schrieb selva.n...@gmail.com:
From: Selva Nair <selva.n...@gmail.com>
Selecting the remote host via the management iterface
*sigh* I reviewed the v2 instead of the v3 but the typo is still here :P
+static void
+man_remote_entry_count(struct management *man)
+{
+ unsigned count = 0;
+ if (man->persist.callback.remote_entry_count)
+ {
+ count =
(*man->persist.callback.remote_entry_count)(man->persist.callback.arg);
We could use C99 style here.
+ msg(M_CLIENT, "%u", count);
+ msg(M_CLIENT, "END");
+ }
+ else
+ {
+ msg(M_CLIENT, "ERROR: The remote-entry-count command is not supported by
the current daemon mode");
+ }
+}
+
+#define min(a,b) ((a) < (b) ? (a) : (b))
We already have min_int and min_uint in integer.h. For consistency I
would prefer using those instead of adding a macro.
+
+static void
+man_remote_entry_get(struct management *man, const char *p1, const char *p2)
+{
+ ASSERT(p1);
+
+ if (man->persist.callback.remote_entry_get
+ && man->persist.callback.remote_entry_count)
+ {
+ bool res;
+ unsigned int from, to;
+ unsigned int count =
(*man->persist.callback.remote_entry_count)(man->persist.callback.arg);
+
+ from = (unsigned int) atoi(p1);
+ to = p2? (unsigned int) atoi(p2) : from + 1;
+
We probably want a space after p2.
I know this has been very long and we are very close to 2.6 so
Acked-By: Arne Schwabe <a...@rfc2549.org>
Maybe we can do a follow up patch to fix the mentioned small issues.
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel