On Sept. 6, 2013, 4:37 p.m., Roman Rakus wrote:
> src/journald/LMI_JournalMessageLogProvider.c, lines 253-254
>
<
http://reviewboard-openlmi.rhcloud.com/r/837/diff/1/?file=4514#file4514li...
>
> init to NULL
This is first initialized by the g_strdup() call, no need for explicit intialization.
On Sept. 6, 2013, 4:37 p.m., Roman Rakus wrote:
> src/journald/LMI_JournalMessageLogProvider.c, line 270
>
<
http://reviewboard-openlmi.rhcloud.com/r/837/diff/1/?file=4514#file4514li...
>
> What if strdup fails?
Then journal_iter_parse_iterator_string() as a first user would return FALSE and
CMPIStatus* status is set accordingly.
On Sept. 6, 2013, 4:37 p.m., Roman Rakus wrote:
> src/journald/LMI_JournalMessageLogProvider.c, line 213
>
<
http://reviewboard-openlmi.rhcloud.com/r/837/diff/1/?file=4514#file4514li...
>
> Rather use some constant.
This was made intentionally, the schema explicitly states return values for very method.
However the values seem consistent so I turned them into constants.
On Sept. 6, 2013, 4:37 p.m., Roman Rakus wrote:
> src/journald/LMI_JournalMessageLogProvider.c, lines 302-304
>
<
http://reviewboard-openlmi.rhcloud.com/r/837/diff/1/?file=4514#file4514li...
>
> init to NULL
Same as above, this is not needed.
- Tomáš
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard-openlmi.rhcloud.com/r/837/#review1103
-----------------------------------------------------------
On Sept. 6, 2013, 3:05 p.m., Tomáš Bžatek wrote:
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard-openlmi.rhcloud.com/r/837/
-----------------------------------------------------------
(Updated Sept. 6, 2013, 3:05 p.m.)
Review request for OpenLMI Developers.
Repository: openlmi-providers
Description
-------
journald: Add support for iterators
This implements CIM_MessageLog iterator functionality according to
the model. The only limitation, or, let's say shortcoming, is a
free-form output data format from the GetRecord call. Currently we
feed the uint8 array with UTF-8 chars and it's up to the client to
deal with it (as suggested in the model). This may be subject to
change.
Many methods are returning modified iterator that has been passed
in and that allows having persistent iterators. As long as CIMOMs
may destroy the instances and unload providers on inactivity, any
particular delay would cause loss of the iterator. The iterator
string contains journal cursor string, uniquely identifying a
record. When this part of the iterator string is valid, the
provider is able to reopen journal and seek to that position,
allowing seamless continuation of the itearation process. If the
cursor points to non-existing record, an error is returned. This
typically happens when journal is rotated or the cursor is very
old.
The provider keeps track of active iterators during its lifetime,
keeping the journal open for fast access. Clients are supposed to
close the iterator by calling the CancelIteration method.
--
some TODOs will be addressed in future patches
tests will be published soon
Diffs
-----
src/journald/LMI_JournalMessageLogProvider.c PRE-CREATION
src/journald/instutil.h PRE-CREATION
src/journald/instutil.c PRE-CREATION
Diff:
http://reviewboard-openlmi.rhcloud.com/r/837/diff/
Testing
-------
Thanks,
Tomáš Bžatek