Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

informal code review of the libconf branch #18

Open
clepple opened this issue Mar 13, 2013 · 5 comments
Open

informal code review of the libconf branch #18

clepple opened this issue Mar 13, 2013 · 5 comments
Assignees
Labels
bug enhancement nutconf NUT configuration library and tool
Projects

Comments

@clepple
Copy link
Member

clepple commented Mar 13, 2013

Some of the warnings on the clang builders prompted me to take a closer look at the libconf branch.

NutStream::status_t NutFile::putData(const std::string & data) has a comment that there is not a FILE* interface for writing arbitrary data. What about fwrite()?

tempnam() should probably be replaced with mkstemp(). Then you won't need the hard-coded /var/tmp variable. (Some systems implement per-user $TMPDIR variables, which eliminate some corner cases and race conditions.)

This expression won't do bit operations: ss << (packed && 0x000000ff) << ".";

Also, you should consider using the standard inet_?to? functions here, especially for the IPv6 address printer.

@ghost ghost assigned vencik Mar 13, 2013
@EmilienKia
Copy link
Contributor

I have started a review of this branch to intend to rework the branch to make it cleaner to read.

I want to:

  • extract all work not in relation to libconf/nutconf in other branches (mainly mge-xml enhancements and AIX support)
  • rework some commits:
    • split commits mixing libconf and nutconf in distinct ones
    • merging commits when some glitches occur
  • split, if possible, nutconf tool code from libconf, in two distinct branches nutconf emerging from libconf
  • rebase all this f###ing base of code more up to date.

Based on that, I think some work on libconf should be done:

  • Revamp code of parser/writer on modules with coherent name scheme
  • Really use data source to parse (and not dump it in string as now)
  • Write more doc. IMHO the doc (mine in particular) is not really understandable and usable.
  • And so much more ...

@EmilienKia
Copy link
Contributor

First of all, I think Vasek can precise what he has done for mge-xml and AIX.

Have the code been merged (or picked) to master ? as master looks like having similar code ?

@clepple
Copy link
Member Author

clepple commented Jan 29, 2014

Fred opened a few pull requests for Vasek's work. Some of the commit messages were not very specific, so they were cherry-picked and reworded (rather than merged).

AIX compilation fixes: #58
mge-xml: #59

I am not sure about some of the AIX packaging improvements.

If you do an interactive rebase onto master, then you probably want to skip d2e1bb0, 704d763, and 72d3fd1 from the mge-xml fixes. Unfortunately, there may be some other merge conflicts if Git doesn't pick up the rename of configure.in to configure.ac.

@EmilienKia
Copy link
Contributor

Thanks Charles, I will look at them.

@EmilienKia
Copy link
Contributor

After investigations, I can confirm that commit 7b16fac closing bug #59 is about the squashing of commits 6ffc259, e54ce1c, 1695533, d2e1bb0, 704d763 and 72d3fd1.
In consequence, if the libconf branch is reworked, these commits can be removed.

jimklimov pushed a commit to jimklimov/nut that referenced this issue Oct 10, 2017
…0828

FTY remerge 20170828 - foundation for lookup functions support in DMF
@jimklimov jimklimov added the nutconf NUT configuration library and tool label Jan 24, 2024
@jimklimov jimklimov added this to To Do in SmartNUT via automation Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug enhancement nutconf NUT configuration library and tool
Projects
SmartNUT
  
To Do
Development

No branches or pull requests

4 participants