On 12/24/2012 05:55 PM, Dmitri Pal wrote:
On 12/24/2012 11:38 AM, Dmitri Pal wrote:
Hello,

After some evaluation it became apparent that error level
and collision flags should not be a part of the fileobj
but rather passed directly to the parser function.
This way the interface is more clean and logical.
This patch:
1) Removes the error level and collision flags from
the fileobj
2) Moves validation function from ini_fileobj.c
to ini_configobj.c where it belongs.
3) Moves error level and collision flags arguments
from file open function to the parser function.
4) The internals of the file obj are cleaned  
5) Validation of the arguments is moved to parser function.
6) Unit tests are updated.

It turned our that was not enough.
Here is the second part.
 
[INI] More interface refactoring

I also realized that error list processing should not be
bound to the file object.
This patch corrects that by moving the error_list and
corresponding count from file object to the config object.
Things updated by the patch:
1. The internal variables are moved from file obj to config obj.
2. The external header is updated to reflect the change
3. Functions are moved from file obj module to config obj module.
4. Parser code is updated because error validation was in
   the wrong place
5. Unit test is adjusted to get error list from the right object.

I had to adjust the copy function for the config object.
Copy function does not copy over the error list.


Forgot to mention that there is a patch in between the two.
I also added a unit test.

Four last patches attached. They are all related so I am re-sending them.

Patch 1 - refactoring
Patch 2 - new parsing flags
Patch 3 - more refactoring
Patch 4 - unit test for parsing flags




_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/sssd-devel


-- 
Thank you,
Dmitri Pal

Sr. Engineering Manager for IdM portfolio
Red Hat Inc.


-------------------------------
Looking to carve out IT costs?
www.redhat.com/carveoutcosts/




_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/sssd-devel


-- 
Thank you,
Dmitri Pal

Sr. Engineering Manager for IdM portfolio
Red Hat Inc.


-------------------------------
Looking to carve out IT costs?
www.redhat.com/carveoutcosts/