[Spice-devel] 答复: [PATCH 01/12] server/reds: fix typo

Jif Shen m3l3m01t at gmail.com
Fri Dec 17 18:17:40 PST 2010


Thanks for reply.
The customized messages I want is something like current user's (sitting
before spicec window)
account info, and want these information being transfer to guest OS.
With these information, user will find their personal enviroment has
already being prepared.
This feature is like guest resolution feature, which requires
monitor/video card info of client side.

If there is such interface, we don't need to patch and recompile
vdagent, we write plugins instead. :-)


于 2010年12月17日 17:45, Hans de Goede 写道:
> Hi,
>
> On 12/17/2010 06:39 AM, Jiff Shen wrote:
>> Is there an plan to make vdagent/vdservice to provide a interface, so that
>> other apps in guest can register a message handler, to parse customized
>> messages send over spice channel?
> There is no such plan, and given that the agent channel is multiplexed
> with other channels in one tcp stream, I'm not sure if doing so is a good
> idea. These custom message may be too big causing latency issues which
> then will be very hard to track down.
>
> WRT your type patch, thanks! But we've a policy that we don't do type fixes
> like these (of which there unfortunately are a lot) unless we are touching
> the code in question also for other reasons.
>
> Regards,
>
> Hans
>
>
>  With this interface, client can provide
>> provision data to guest OS.
>>
>> -----邮件原件-----
>> 发件人: spice-devel-bounces+m3l3m01t=gmail.com at lists.freedesktop.org
>> [mailto:spice-devel-bounces+m3l3m01t=gmail.com at lists.freedesktop.org] 代表
>> Alon Levy
>> 发送时间: Monday, December 06, 2010 6:49 PM
>> 收件人: spice-devel at freedesktop.org
>> 主题: [Spice-devel] [PATCH 01/12] server/reds: fix typo
>>
>> ---
>>   server/reds.c |   10 +++++-----
>>   1 files changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/server/reds.c b/server/reds.c index 728778c..d77b9d9 100644
>> --- a/server/reds.c
>> +++ b/server/reds.c
>> @@ -75,7 +75,7 @@ static SpiceCharDeviceInstance *vdagent = NULL;  #define
>> REDS_AGENT_WINDOW_SIZE 10  #define REDS_TOKENS_TO_SEND 5  #define
>> REDS_NUM_INTERNAL_AGENT_MESSAGES 1 -#define REDS_VDI_PORT_NUM_RECIVE_BUFFS 5
>> +#define REDS_VDI_PORT_NUM_RECEIVE_BUFFS 5
>>   #define REDS_MAX_SEND_IOVEC 100
>>
>>   #define NET_TEST_WARMUP_BYTES 0
>> @@ -109,7 +109,7 @@ static void openssl_init();  #define
>> VDI_PORT_WRITE_RETRY_TIMEOUT 100 /*ms*/
>>
>>   // approximate max receive message size -#define RECIVE_BUF_SIZE \
>> +#define RECEIVE_BUF_SIZE \
>>       (4096 + (REDS_AGENT_WINDOW_SIZE + REDS_NUM_INTERNAL_AGENT_MESSAGES) *
>> SPICE_AGENT_MAX_DATA_SIZE)
>>
>>   #define SEND_BUF_SIZE 4096
>> @@ -122,7 +122,7 @@ typedef struct IncomingHandler {
>>       spice_parse_channel_func_t parser;
>>       void *opaque;
>>       int shut;
>> -    uint8_t buf[RECIVE_BUF_SIZE];
>> +    uint8_t buf[RECEIVE_BUF_SIZE];
>>       uint32_t end_pos;
>>       void (*handle_message)(void *opaque, size_t size, uint32_t type, void
>> *message);  } IncomingHandler; @@ -784,7 +784,7 @@ static int
>> handle_incoming(RedsStreamContext *peer, IncomingHandler *handler)
>>           uint8_t *end = buf + pos;
>>           SpiceDataHeader *header;
>>           int n;
>> -        n = peer->cb_read(peer->ctx, buf + pos, RECIVE_BUF_SIZE - pos);
>> +        n = peer->cb_read(peer->ctx, buf + pos, RECEIVE_BUF_SIZE -
>> + pos);
>>           if (n<= 0) {
>>               if (n == 0) {
>>                   return -1;
>> @@ -3667,7 +3667,7 @@ static void init_vd_agent_resources()
>>           ring_add(&reds->agent_state.internal_bufs,&buf->base.link);
>>       }
>>
>> -    for (i = 0; i<  REDS_VDI_PORT_NUM_RECIVE_BUFFS; i++) {
>> +    for (i = 0; i<  REDS_VDI_PORT_NUM_RECEIVE_BUFFS; i++) {
>>           VDIReadBuf *buf = spice_new0(VDIReadBuf, 1);
>>           ring_item_init(&buf->link);
>>           ring_add(&reds->agent_state.read_bufs,&buf->link);
>> --
>> 1.7.3.2
>>
>> _______________________________________________
>> Spice-devel mailing list
>> Spice-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>>
>> _______________________________________________
>> Spice-devel mailing list
>> Spice-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/spice-devel
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel



More information about the Spice-devel mailing list