This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/795/

src/account/lock.h (Diff revision 1)
19
    lock_node_t tail;
why is 'tail' lock_node_t? tail.next & tail.lock are never used.

IMHO it should be lock_node_t *, pointing to the last item in the list or NULL when the list is empty.

It will make the code below more readable.

src/account/lock.c (Diff revision 1)
98
    lock_node_t *new_node = malloc (sizeof (lock_node_t));
use calloc or initialize new_node->lock->id to zeroes otherwise, you're expecting that on line 108.

I also miss lot of error case checking & returning.

- Jan Safranek


On September 2nd, 2013, 11:50 a.m. CEST, Robin Hack wrote:

Review request for OpenLMI Developers.
By Robin Hack.

Updated Sept. 2, 2013, 11:50 a.m.

Repository: openlmi-providers

Description

Account: Added associative thread locking.

Missing files included.

Diffs

  • src/account/CMakeLists.txt (495d7c6e3e1e083541d3ed004518dc4539f61d48)
  • src/account/LMI_AccountProvider.c (5abad7261331c429de0503b8bfb9f8fc180141cf)
  • src/account/lock.h (PRE-CREATION)
  • src/account/lock.c (PRE-CREATION)

View Diff