From d1a9c84a6b375cb25a8b7475957130e364b41753 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 2 Jul 2018 22:36:08 -0700 Subject: fixes #572 Several locking errors found fixes #573 atomic flags could help This introduces a new atomic flag, and reduces some of the global locking. The lock refactoring work is not yet complete, but this is a positive step forward, and should help with certain things. While here we also fixed a compile warning due to incorrect types. --- src/core/socket.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core/socket.c') diff --git a/src/core/socket.c b/src/core/socket.c index 4d7bbbc1..620c5d19 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -33,8 +33,8 @@ struct nni_ctx { }; typedef struct sock_option { - const char *o_name; - int o_type; + const char * o_name; + nni_opt_type o_type; int (*o_get)(nni_sock *, void *, size_t *, nni_opt_type); int (*o_set)(nni_sock *, const void *, size_t, nni_opt_type); } sock_option; @@ -42,7 +42,7 @@ typedef struct sock_option { typedef struct nni_sockopt { nni_list_node node; char * name; - int typ; + nni_opt_type typ; size_t sz; void * data; } nni_sockopt; -- cgit v1.2.3-70-g09d2