Hi Martin,

> I hope the disconnected state can be gotten through 
> connman_device_get_disconnected().
> Below is the patch, please review.
> 
> diff --git a/src/connman.h b/src/connman.h
> index 2273769..56842bf 100644
> --- a/src/connman.h
> +++ b/src/connman.h
> @@ -225,6 +225,8 @@ connman_bool_t __connman_device_has_driver(struct 
> connman_device *device);
>  const char *__connman_device_get_type(struct connman_device *device);
>  const char *__connman_device_get_ident(struct connman_device *device);
>  
> +gboolean connman_device_get_disconnected(struct connman_device *device);
> +

we don't use gboolean, we use connman_bool_t for this.

And this prototype should be added after connman_device_set_disconnected
of course.

>  int __connman_device_set_offlinemode(connman_bool_t offlinemode);
>  
>  int __connman_profile_add_device(struct connman_device *device);
> diff --git a/src/device.c b/src/device.c
> index a2507b5..6d9126f 100644
> --- a/src/device.c
> +++ b/src/device.c
> @@ -1765,6 +1765,17 @@ void *connman_device_get_data(struct connman_device 
> *device)
>  }
>  
>  /**
> + * connman_device_get_disconnected:
> + * @device: device structure
> + *
> + * Get private device disconnected state
> + */
> +gboolean connman_device_get_disconnected(struct connman_device *device)
> +{
> +     return device->disconnected;
> +}
> +
> +/**

Please move this function after connman_device_set_disconnected.

Regards

Marcel


_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to