diff options
| author | Garrett D'Amore <garrett@damore.org> | 2019-12-29 14:39:27 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2019-12-29 15:21:42 -0800 |
| commit | b4d3ff2d460607ba8e1b351233cb6cbe9f031264 (patch) | |
| tree | 74a9aba0717f74404438bbca1bdc75a9e6105abf /src/protocol | |
| parent | e457590015f8c3f4e840e4bed290f052c001e07c (diff) | |
| download | nng-b4d3ff2d460607ba8e1b351233cb6cbe9f031264.tar.gz nng-b4d3ff2d460607ba8e1b351233cb6cbe9f031264.tar.bz2 nng-b4d3ff2d460607ba8e1b351233cb6cbe9f031264.zip | |
fixes #1064 Potential deadlock in statistics code
fixes #1063 Include sanitizer runs in CI
fixes #1068 Wssfile test sometimes fails with wrong error code
While here, addressed a number of clang-tidy items, and some light
cleanup of code we were already in.
Diffstat (limited to 'src/protocol')
| -rw-r--r-- | src/protocol/pair1/pair.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/protocol/pair1/pair.c b/src/protocol/pair1/pair.c index 7adb8bd8..70654d6d 100644 --- a/src/protocol/pair1/pair.c +++ b/src/protocol/pair1/pair.c @@ -22,7 +22,7 @@ #define NNI_PROTO_PAIR_V1 NNI_PROTO(1, 1) #endif -#define BUMPSTAT(x) nni_stat_inc_atomic(x, 1) +#define BUMP_STAT(x) nni_stat_inc_atomic(x, 1) typedef struct pair1_pipe pair1_pipe; typedef struct pair1_sock pair1_sock; @@ -199,7 +199,7 @@ pair1_pipe_start(void *arg) nni_mtx_lock(&s->mtx); if (nni_pipe_peer(p->npipe) != NNI_PROTO_PAIR_V1) { nni_mtx_unlock(&s->mtx); - BUMPSTAT(&s->stat_rejmismatch); + BUMP_STAT(&s->stat_rejmismatch); // Peer protocol mismatch. return (NNG_EPROTO); } @@ -213,7 +213,7 @@ pair1_pipe_start(void *arg) if (!nni_list_empty(&s->plist)) { nni_idhash_remove(s->pipes, id); nni_mtx_unlock(&s->mtx); - BUMPSTAT(&s->stat_rejinuse); + BUMP_STAT(&s->stat_rejinuse); return (NNG_EBUSY); } } else { |
