--- libaitio/src/Attic/vars.c 2012/07/31 15:02:35 1.11.4.1 +++ libaitio/src/Attic/vars.c 2012/07/31 16:04:52 1.11.4.4 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: vars.c,v 1.11.4.1 2012/07/31 15:02:35 misho Exp $ +* $Id: vars.c,v 1.11.4.4 2012/07/31 16:04:52 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -466,6 +466,9 @@ io_freeVar(ait_val_t ** __restrict val) /* * io_makeVar() - Allocate memory and fill variable * + * @type = type of variable + * @... = arg1 is value of variable + * @... = arg2 is length of variabla. Not required for numbers and strings! * return: NULL error or new variable, after use free variable with io_freeVar() */ ait_val_t * @@ -493,7 +496,7 @@ io_makeVar(ait_type_t type, ...) break; case data: p = va_arg(lst, void*); - v->val_len = va_arg(lst, uint32_t); + len = va_arg(lst, uint32_t); AIT_SET_DATA(v, p, len); break; case buffer: @@ -503,7 +506,7 @@ io_makeVar(ait_type_t type, ...) break; case string: p = va_arg(lst, char*); - AIT_SET_STR(v, p); + AIT_SET_STR(v, (char*) p); break; case blob: n = va_arg(lst, uint32_t);