Cli navigation#33
Conversation
Connman could set the IPv6·privacy·option as prefered and also preferred. Add the misspelled property value to the map for the same key. Signed-off-by: Eduardo Gonzalez <eduardo.gonzalez@amarulasolutions.com>
Remove the print method of the different properties. The consumer should define the output stream to put the properties. Remove unused iostream header includes. Signed-off-by: Eduardo Gonzalez <eduardo.gonzalez@amarulasolutions.com>
Signed-off-by: Eduardo Gonzalez <eduardo.gonzalez@amarulasolutions.com>
There was a problem hiding this comment.
Code Review
This pull request integrates the readline library into the connmanctl example to provide an interactive CLI with command completion and improved asynchronous message handling. It also refactors the property printing logic across the library by replacing print() methods with operator<< overloads for better stream integration. Feedback highlights several critical thread-safety issues and state management bugs in the new CLI implementation, specifically regarding data races on shared variables like connecting and passphrase, and potential hangs if connection attempts fail. Additionally, the use of the non-thread-safe std::localtime was flagged for replacement with localtime_r to ensure library reliability in multi-threaded environments.
There was a problem hiding this comment.
Code Review
This pull request enhances the connmanctl example by integrating GNU Readline to provide an interactive shell with tab completion and command history. It also refactors the library's property printing mechanism by replacing print() member functions with operator<< overloads across various property classes and updates the test suite accordingly. Feedback from the review identifies a thread-safety issue with std::localtime in the clock properties implementation, a potential data race on the connecting flag in the example application, and missing header inclusions for string manipulation functions.
|
🧩 Build Artifacts ✅ The following build artifacts were produced: |
Add readline in the connmanctl_dbus example. Allows completion, line editing, and interactive history while using the app. Improve command string manipulation and align better on how original connmanctl works. Signed-off-by: Eduardo Gonzalez <eduardo.gonzalez@amarulasolutions.com>
Signed-off-by: Eduardo Gonzalez <eduardo.gonzalez@amarulasolutions.com>
|
🧩 Build Artifacts ✅ The following build artifacts were produced: |
Use readline to add completion, line editing, and interactive history manipulation to the connmanctl_dbus example app.
Fix some small issues in the example and in the property value mapping of the services.
Remove the use of the standard output streams when getting properties. The consumer should define the output stream to put the properties.