[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-ha-dev
Subject:    RE: [Linux-ha-dev] netstring ha_msg_mod ?
From:       "Zhu, Yi" <yi.zhu () intel ! com>
Date:       2004-06-25 1:53:27
Message-ID: 3ACA40606221794F80A5670F0AF15F8403BD55A0 () pdsmsx403
[Download RAW message or body]

Guochun wrote:
> At 11:05 AM 6/24/2004 -0500, you wrote:
>> Yi,
>> 
>> ha_msg_mod() only deals with string. Binary value will have some
>> problem. I am thinking adding a function
>> 
>> int
>> cl_msg_mod( struct ha_msg * msg, const char *name, void* value, 
>> size_t vlen,  int type); 
>> 
>> This will allow string, binary and struct value to be replaced.  The
>> ha_msg_mod() will be a wrapper function to cl_msg_mod().
>> 
>> Will this meet your needs?
> 
> 
> Here is what I have added:
> 
> 
> int             cl_msg_modstring(struct ha_msg * msg,
>                            const char* name,
>                            const char* value);
> int             cl_msg_modbin(struct ha_msg * msg,
>                               const char* name,
>                               const void* value,
>                               size_t vlen);
> int             cl_msg_modstruct(struct ha_msg * msg,
>                                  const char* name,
>                                  const struct ha_msg* value);
> #define ha_msg_mod(msg, name, value) cl_msg_modstring(msg, name,
> value) 
> 
> 
> Please let me know if this works for you or not.

Amazing speed! I'll try it and let you know.

Thanks,
-yi

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic