[PATCH v4 2/3] openconnect_get_supported_protocols should return the number of protocols

Daniel Lenski dlenski at gmail.com
Sun Apr 9 02:05:46 PDT 2017


Signed-off-by: Daniel Lenski <dlenski at gmail.com>
---
 library.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/library.c b/library.c
index 86b524a..48f458a 100644
--- a/library.c
+++ b/library.c
@@ -178,7 +178,7 @@ int openconnect_get_supported_protocols(struct oc_vpn_proto **protos)
 		pr->description = _(p->description);
 		pr->flags = p->flags;
 	}
-	return 0;
+	return (p - openconnect_protos);
 }
 
 void openconnect_free_supported_protocols(struct oc_vpn_proto *protos)
-- 
2.7.4




More information about the openconnect-devel mailing list