Fix a bug in subscribers counting
authorJosé Bollo <jose.bollo@iot.bzh>
Thu, 18 May 2017 14:57:12 +0000 (16:57 +0200)
committerJosé Bollo <jose.bollo@iot.bzh>
Thu, 18 May 2017 14:57:12 +0000 (16:57 +0200)
commit9eb56fc592c6e2c305a0fbcc69499271ac034236
treeb04ef562218ae5aa169f0c7a5c21e0753efd0557
parent8abd9262e343aec71e07388bdf829d4f76d6529e
Fix a bug in subscribers counting

To avoid as much as possible allocation/deallocation
when possible sequences of subscribe/unsubscribe are
encountered, the watch strucutre of events is destroyed
only when either the event or the client is destroyed.

This commit fixes a bad handling in the count of
active subscribers.

Change-Id: I3f240e69c3b21356ff07f584fe9bfb578d46732b
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/afb-evt.c