mbox series

[0/2] service: Add and Leverage 'clear_error'

Message ID 20231120215329.786768-1-gerickson@nuovations.com (mailing list archive)
Headers show
Series service: Add and Leverage 'clear_error' | expand

Message

Grant Erickson Nov. 20, 2023, 9:53 p.m. UTC
There are a suffient number of instantiations of the following
implementation pattern:

    set_error(service, CONNMAN_SERVICE_ERROR_UNKNOWN);

to clear or reset the "Error" service property where it makes sense to
embody this in a single function.

This introduces and leverages the 'clear_error' function to embody
this pattern.

Grant Erickson (2):
  service: Add and leverage 'clear_error'.
  service: Document '{clear,set}_error'.

 src/service.c | 56 +++++++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 50 insertions(+), 6 deletions(-)

Comments

Marcel Holtmann Nov. 23, 2023, 11:27 a.m. UTC | #1
Hi Grant,

> There are a suffient number of instantiations of the following
> implementation pattern:
> 
>    set_error(service, CONNMAN_SERVICE_ERROR_UNKNOWN);
> 
> to clear or reset the "Error" service property where it makes sense to
> embody this in a single function.
> 
> This introduces and leverages the 'clear_error' function to embody
> this pattern.
> 
> Grant Erickson (2):
>  service: Add and leverage 'clear_error'.
>  service: Document '{clear,set}_error'.
> 
> src/service.c | 56 +++++++++++++++++++++++++++++++++++++++++++++------
> 1 file changed, 50 insertions(+), 6 deletions(-)

both patches have been applied.

Regards

Marcel