-
Notifications
You must be signed in to change notification settings - Fork 4
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
Replace parhand with axparameter #78
Conversation
src/parameter.cpp
Outdated
} | ||
ax_parameter_free(ax_parameter); | ||
g_clear_error(&error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there are errors more than once from ax_parameter_get, this will only deallocate the last one.
ax_parameter_get() will only set an error when it returns false, so put g_clear_error() inside the if-block instead. No need for it here.
c059463
to
31647b0
Compare
tested, +1 |
src/parameter.cpp
Outdated
Status Parameter::GetValues(ServerContext* context, | ||
ServerReaderWriter<Response, Request>* stream) { | ||
// Initialize Parameter Service | ||
bool Parameter::Init(const bool verbose) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comments in https://github.com/AxisCommunications/acap-runtime/pull/80/files about constructor instead of two-phase initialization.
dbc1491
to
44a5b2f
Compare
081c963
to
1fb55df
Compare
b3d3c1d
to
532a8e2
Compare
1fb55df
to
9aed79c
Compare
67c905d
to
39de532
Compare
9aed79c
to
5ab3e6e
Compare
39de532
to
a4b81cd
Compare
5ab3e6e
to
e69d6cd
Compare
e69d6cd
to
041fcdd
Compare
@@ -35,6 +36,8 @@ class Parameter final : public KeyValueStore::Service { | |||
private: | |||
Status GetValues(ServerContext* context, ServerReaderWriter<Response, Request>* stream); | |||
|
|||
AXParameter* ax_parameter; | |||
GError* _error; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need for this to be a class member. It can be a local variable in each function it is used.
Describe your changes
Since axparameter is now included in the SDK let's use it instead of parhand.
Issue ticket number and link
Checklist before requesting a review