On Wednesday 29 January 2014 11:25:12 Antonio Quartulli wrote:
From: Antonio Quartulli antonio@open-mesh.com
When adding a new neighbour it is important to atomically perform the following:
- check if the neighbour already exists
- append the neighbour to the proper list
If the two operations are not performed in an atomic context it is possible that two concurrent insertions add the same neighbour twice.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com
Changes from v3:
- remove useless initialization
Changes from v2:
- fix typ0
Changes from v1:
- release hard_iface if we already have a matching neighbour
bat_iv_ogm.c | 22 ++++++++++++++++------ originator.c | 36 ++++++++++++++++++++++++++++++++++++ originator.h | 4 ++++ 3 files changed, 56 insertions(+), 6 deletions(-)
Applied in revision e08e28f.
Thanks, Marek