[EMAIL PROTECTED] wrote:
> CVS commit to /cvsroot/powersave/powersave/daemon by hmacht
> 
> Modified Files:
>       powersaved.cpp 
> Log Message:
> - added correct returns
> - return ac state correctly if ac adapter status is not available
> 
> ===================================================================
> RCS file: /cvsroot/powersave/powersave/daemon/powersaved.cpp,v
> retrieving revision 1.126
> retrieving revision 1.127
> diff -u -r1.126 -r1.127
> --- /cvsroot/powersave/powersave/daemon/powersaved.cpp        2005/08/09 
> 12:23:34     1.126
> +++ /cvsroot/powersave/powersave/daemon/powersaved.cpp        2005/08/09 
> 14:55:33     1.127
> @@ -1590,6 +1590,8 @@
>               case _DYNAMIC:
>                       policy = "dynamic";
>                       break;
> +             default:
> +                     return REPLY_HW_NOT_SUPPORTED;
>               }
>               dbus_message_append_args(reply,
>                                        DBUS_TYPE_STRING, &policy,
> @@ -1604,8 +1606,11 @@
>               case AC_OFFLINE:
>                       dummy = "off";
>                       break;
> +             case AC_UNKNOWN:
> +                     dummy = "unknown";
> +                     break;
Why does unknown exist powersaved.cpp now?
I only used this in deeper functions (libpowersave).
The daemon itself only knows about ac/battery or you have to
test for unknown all the time which practically cannot exists.

Better remove unknown and asume online.

>               default:
> -                     return REPLY_GENERAL_ERROR;
> +                     return REPLY_HW_NOT_SUPPORTED;
>               }
>               dbus_message_append_args(reply,
>                                        DBUS_TYPE_STRING, &dummy,

_______________________________________________
powersave-devel mailing list
[email protected]
http://forge.novell.com/mailman/listinfo/powersave-devel

Reply via email to