[Spice-devel] [PATCH 1/5] client: don't fall through for CONTROLLER_SEND_CAD

Christophe Fergeau cfergeau at redhat.com
Mon Feb 27 01:58:27 PST 2012


On Sun, Feb 26, 2012 at 05:43:31PM +0100, Alon Levy wrote:
> ---
>  client/controller.cpp |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/client/controller.cpp b/client/controller.cpp
> index 91c0021..93805bc 100644
> --- a/client/controller.cpp
> +++ b/client/controller.cpp
> @@ -335,6 +335,8 @@ bool ControllerConnection::handle_message(ControllerMsg *hdr)
>          _handler->delete_menu();
>          break;
>      case CONTROLLER_SEND_CAD:
> +        LOG_ERROR("TODO: CONTROLLER_SEND_CAD is not impelemented");

"implemented"

Falling through may have been intentional, an error is logged and the
message isn't that bad. false is returned in the default: block, and with
your patch, true will be returned, shouldn't it be false as well?

Christophe

> +        break;
>      default:
>          LOG_ERROR("Ignoring an unknown controller message %u", hdr->id);
>          return false;
> -- 
> 1.7.9.1
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20120227/0bb87563/attachment.pgp>


More information about the Spice-devel mailing list