[Spice-devel] [PATCH] client: handling SPICE_MSG_MAIN_MIGRATE_SWITCH_HOST
Yonit Halperin
yhalperi at redhat.com
Wed Mar 31 07:24:21 PDT 2010
On 03/31/2010 03:42 PM, Alexander Larsson wrote:
> On Sun, 2010-03-28 at 18:21 +0300, Yonit Halperin wrote:
>> disconnecting from the current host and connecting to the target host.
>
> + SpiceMsgMainMigrationSwitchHost* migrate = (SpiceMsgMainMigrationSwitchHost*)message->data();
> + char* host = ((char*)migrate) + migrate->host_offset;
> + char* subject = NULL;
> + if (migrate->cert_subject_size) {
> + subject = ((char*)migrate)+ migrate->cert_subject_offset;
> + }
>
> This needs to at least verify that the strings are zero terminated
> before creating std::strings from them.
o.k
>
> void RedClient::connect()
> {
> + connect(false);
> +}
> +
> +void RedClient::connect(bool wait_main_disconnect)
>
> Can't you use default argument values here instead of two functions?
>
Connect() is virtual declared in red_channel.
More information about the Spice-devel
mailing list