actube/src/cw/cw_in_generic_with_index.c
7u83@mail.ru 1f68439fa7 Byte - in has now valguard
FossilOrigin-Name: 7926e93ff40c6f5f6b34190ed6591339025f1a23c93469370c1fa160176571e5
2018-04-25 08:43:27 +00:00

15 lines
332 B
C

#include "cw.h"
int cw_in_generic_with_index(struct cw_ElemHandler *eh,
struct cw_ElemHandlerParams *params,
uint8_t * data, int len)
{
char key[CW_KTV_MAX_KEY_LEN];
int idx;
idx = cw_get_byte(data);
sprintf(key,"%s.%d",eh->key,idx);
cw_ktv_add(params->conn->remote_cfg,key,eh->type,NULL,data+1,len-1);
return 1;
}