[Linux-ha-dev] netstring ha_msg_mod ?
Guochun Shi
gshi at ncsa.uiuc.edu
Thu Jun 24 15:01:09 MDT 2004
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.
-Guochun
More information about the Linux-HA-Dev
mailing list