----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/795/ -----------------------------------------------------------
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
----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/795/#review1043 -----------------------------------------------------------
src/account/lock.c http://reviewboard-openlmi.rhcloud.com/r/795/#comment577
Whitespace be-gone.
src/account/lock.c http://reviewboard-openlmi.rhcloud.com/r/795/#comment574
There seems to be a missing piece of code here.
src/account/lock.c http://reviewboard-openlmi.rhcloud.com/r/795/#comment578
Code missing.
src/account/lock.c http://reviewboard-openlmi.rhcloud.com/r/795/#comment575
I wouldn't call releasing a lock 'unleashing'. Why not release_lock?
src/account/lock.c http://reviewboard-openlmi.rhcloud.com/r/795/#comment576
Whitespace be-gone.
Also, please use whitespaces consistently. That means write strcmp(something, here) instead of strcmp ( something, here ).
- Jan Synacek
On Sept. 2, 2013, 11: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, 11: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
On Sept. 2, 2013, 12:32 p.m., Robin Hack wrote:
Also, please use whitespaces consistently. That means write strcmp(something, here) instead of strcmp ( something, here ).
One more thing, you should also probably respect the if structure indentation used in the provider. It uses the gnu style if () { /* code here */ }
- Jan
----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/795/#review1043 -----------------------------------------------------------
On Sept. 2, 2013, 11: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, 11: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
On Sept. 2, 2013, 12:32 p.m., Robin Hack wrote:
Also, please use whitespaces consistently. That means write strcmp(something, here) instead of strcmp ( something, here ).
Jan Synacek wrote: One more thing, you should also probably respect the if structure indentation used in the provider. It uses the gnu style if () { /* code here */ }
Well, I would rather rewrite the account provider to adapt to rest of the providers, see https://fedorahosted.org/openlmi/wiki/CodingConventions
- Jan
----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/795/#review1043 -----------------------------------------------------------
On Sept. 2, 2013, 11: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, 11: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
On Sept. 2, 2013, 12:32 p.m., Robin Hack wrote:
Also, please use whitespaces consistently. That means write strcmp(something, here) instead of strcmp ( something, here ).
Jan Synacek wrote: One more thing, you should also probably respect the if structure indentation used in the provider. It uses the gnu style if () { /* code here */ }
Jan Safranek wrote: Well, I would rather rewrite the account provider to adapt to rest of the providers, see https://fedorahosted.org/openlmi/wiki/CodingConventions
Yes, that would be ideal.
- Jan
----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/795/#review1043 -----------------------------------------------------------
On Sept. 2, 2013, 11: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, 11: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
On Sept. 2, 2013, 10:32 a.m., Jan Synacek wrote:
src/account/lock.c, line 159 http://reviewboard-openlmi.rhcloud.com/r/795/diff/1/?file=4430#file4430line159
I wouldn't call releasing a lock 'unleashing'. Why not release_lock?
I renamed unleash_lock to release_lock.
- Robin
----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/795/#review1043 -----------------------------------------------------------
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
----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/795/#review1057 -----------------------------------------------------------
src/account/lock.h http://reviewboard-openlmi.rhcloud.com/r/795/#comment588
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 http://reviewboard-openlmi.rhcloud.com/r/795/#comment587
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 Sept. 2, 2013, 11: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, 11: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
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
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.
Robin Hack wrote: 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.
Ok. I rewrote this part.
- 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
----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/795/#review1062 -----------------------------------------------------------
src/account/lock.c http://reviewboard-openlmi.rhcloud.com/r/795/#comment592
Add return values, check them and if error inform the CIMOM
- Roman Rakus
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
----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/795/#review1084 -----------------------------------------------------------
src/account/lock.h http://reviewboard-openlmi.rhcloud.com/r/795/#comment609
I know where the "32" comes from but looking just at the header file it's not that obvious -- try to avoid the magic numbers: give them some name, especially if the same number must be used also somewhere else in the code.
#define USERNAME_LEN_MAX 32
...and use the macro instead.
src/account/lock.c http://reviewboard-openlmi.rhcloud.com/r/795/#comment610
Hm... Maybe I have overlooked something but why isn't new_pool actually defined here?
- Tomas Smetana
On Sept. 2, 2013, 11: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, 11: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
----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/795/ -----------------------------------------------------------
(Updated Sept. 9, 2013, 9:53 a.m.)
Review request for OpenLMI Developers.
Changes -------
Fixed some bugs. Locking mechanism use hash functions from glib.h now.
Repository: openlmi-providers
Description (updated) -------
Account: Added associative thread locking.
Diffs (updated) -----
src/account/CMakeLists.txt 495d7c6e3e1e083541d3ed004518dc4539f61d48 src/account/LMI_AccountProvider.c c7c16bb2beb1ef37e804e7cc7dce6bd182e6d55b 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
----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/795/#review1116 -----------------------------------------------------------
src/account/LMI_AccountProvider.c http://reviewboard-openlmi.rhcloud.com/r/795/#comment632
Does this work? The function returns void, but CMReturn is returning CMPIStatus. I'm not sure if it is possible to do any checks here.
src/account/lock.c http://reviewboard-openlmi.rhcloud.com/r/795/#comment633
Is it good to abort here? It should return some error indication rather.
- Roman Rakus
On Sept. 9, 2013, 9:53 a.m., Robin Hack wrote:
This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/795/
(Updated Sept. 9, 2013, 9:53 a.m.)
Review request for OpenLMI Developers.
Repository: openlmi-providers
Description
Account: Added associative thread locking.
Diffs
src/account/CMakeLists.txt 495d7c6e3e1e083541d3ed004518dc4539f61d48 src/account/LMI_AccountProvider.c c7c16bb2beb1ef37e804e7cc7dce6bd182e6d55b 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
On Sept. 9, 2013, 10:24 a.m., Roman Rakus wrote:
src/account/lock.c, line 161 http://reviewboard-openlmi.rhcloud.com/r/795/diff/2/?file=4521#file4521line161
Is it good to abort here? It should return some error indication rather.
Maybe I'm too nazi here... Hm.. Nop. Why i will call release_lock before pool intialization? If do that I'm mad or drunk. I think that is good place to catch bugs.
On Sept. 9, 2013, 10:24 a.m., Roman Rakus wrote:
src/account/LMI_AccountProvider.c, lines 57-62 http://reviewboard-openlmi.rhcloud.com/r/795/diff/2/?file=4519#file4519line57
Does this work? The function returns void, but CMReturn is returning CMPIStatus. I'm not sure if it is possible to do any checks here.
I don't know :(. I'm not able to find way, how I can check error in this function.
- Robin
----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/795/#review1116 -----------------------------------------------------------
On Sept. 9, 2013, 9:53 a.m., Robin Hack wrote:
This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/795/
(Updated Sept. 9, 2013, 9:53 a.m.)
Review request for OpenLMI Developers.
Repository: openlmi-providers
Description
Account: Added associative thread locking.
Diffs
src/account/CMakeLists.txt 495d7c6e3e1e083541d3ed004518dc4539f61d48 src/account/LMI_AccountProvider.c c7c16bb2beb1ef37e804e7cc7dce6bd182e6d55b 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
----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/795/#review1122 -----------------------------------------------------------
src/account/lock.c http://reviewboard-openlmi.rhcloud.com/r/795/#comment640
Whitespaces.
src/account/lock.c http://reviewboard-openlmi.rhcloud.com/r/795/#comment641
Whitespaces.
- Robin Hack
On Sept. 9, 2013, 9:53 a.m., Robin Hack wrote:
This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/795/
(Updated Sept. 9, 2013, 9:53 a.m.)
Review request for OpenLMI Developers.
Repository: openlmi-providers
Description
Account: Added associative thread locking.
Diffs
src/account/CMakeLists.txt 495d7c6e3e1e083541d3ed004518dc4539f61d48 src/account/LMI_AccountProvider.c c7c16bb2beb1ef37e804e7cc7dce6bd182e6d55b 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
----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/795/ -----------------------------------------------------------
(Updated Sept. 10, 2013, 6:34 a.m.)
Review request for OpenLMI Developers.
Changes -------
Now i use quarks (just int) as keys to hash table. I try to avoid Algorithmic Complexity Attacks because GLib is vulnerable to this kind of attacks.
Summary (updated) -----------------
[3/3] Account: Added associative thread locking.
Repository: openlmi-providers
Description (updated) -------
Account: Added associative thread locking.
I try to avoid Algorithmic Complexity Attack by using quarks as keys in hash table.
Diffs (updated) -----
src/account/lock.c PRE-CREATION src/account/lock.h PRE-CREATION
Diff: http://reviewboard-openlmi.rhcloud.com/r/795/diff/
Testing -------
Thanks,
Robin Hack
----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/795/ -----------------------------------------------------------
(Updated Sept. 10, 2013, 7:14 a.m.)
Review request for OpenLMI Developers.
Changes -------
Just added missing files.
Summary (updated) -----------------
[2/2] Account: Added associative thread locking.
Repository: openlmi-providers
Description (updated) -------
Account: Added associative thread locking.
Also added missing files.
Diffs (updated) -----
src/account/lock.c PRE-CREATION src/account/lock.h PRE-CREATION src/account/LMI_AccountProvider.c c7c16bb2beb1ef37e804e7cc7dce6bd182e6d55b
Diff: http://reviewboard-openlmi.rhcloud.com/r/795/diff/
Testing -------
Thanks,
Robin Hack
----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/795/ -----------------------------------------------------------
(Updated Sept. 10, 2013, 7:16 a.m.)
Review request for OpenLMI Developers.
Summary (updated) -----------------
[3/3] Account: Added associative thread locking.
Repository: openlmi-providers
Description -------
Account: Added associative thread locking.
Also added missing files.
Diffs (updated) -----
src/account/lock.c PRE-CREATION src/account/LMI_AccountProvider.c c7c16bb2beb1ef37e804e7cc7dce6bd182e6d55b src/account/lock.h PRE-CREATION
Diff: http://reviewboard-openlmi.rhcloud.com/r/795/diff/
Testing -------
Thanks,
Robin Hack
----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/795/ -----------------------------------------------------------
(Updated Sept. 10, 2013, 7:16 a.m.)
Review request for OpenLMI Developers.
Repository: openlmi-providers
Description (updated) -------
Account: Added associative thread locking.
Missing CMake entry.
Diffs (updated) -----
src/account/CMakeLists.txt 495d7c6e3e1e083541d3ed004518dc4539f61d48
Diff: http://reviewboard-openlmi.rhcloud.com/r/795/diff/
Testing -------
Thanks,
Robin Hack
----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/795/ -----------------------------------------------------------
(Updated Sept. 10, 2013, 7:26 a.m.)
Status ------
This change has been discarded.
Review request for OpenLMI Developers.
Repository: openlmi-providers
Description -------
Account: Added associative thread locking.
Missing CMake entry.
Diffs -----
src/account/CMakeLists.txt 495d7c6e3e1e083541d3ed004518dc4539f61d48
Diff: http://reviewboard-openlmi.rhcloud.com/r/795/diff/
Testing -------
Thanks,
Robin Hack
openlmi-reviews@lists.fedorahosted.org