On Sept. 2, 2013, 11:23 a.m., Jan Safranek wrote:
src/account/lock.c, line 98 http://reviewboard-openlmi.rhcloud.com/r/795/diff/1/?file=4430#file4430line98
use calloc or initialize new_node->lock->id to zeroes otherwise, you're expecting that on line 108.
Good point. Fixed.
On Sept. 2, 2013, 11:23 a.m., Jan Safranek wrote:
src/account/lock.h, line 19 http://reviewboard-openlmi.rhcloud.com/r/795/diff/1/?file=4429#file4429line19
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.
This solution has ideological reasons. Removing of last node is easier than with dynamic tail. With pointer to last element i must solve that this element is not last. Same in case, when i add new element to empty list.
- Robin
----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/795/#review1057 -----------------------------------------------------------
On Sept. 2, 2013, 9:50 a.m., Robin Hack wrote:
This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/795/
(Updated Sept. 2, 2013, 9:50 a.m.)
Review request for OpenLMI Developers.
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
Diff: http://reviewboard-openlmi.rhcloud.com/r/795/diff/
Testing
Thanks,
Robin Hack