More work on CW VM code ..
FossilOrigin-Name: 3b0cb324535527b32d0e938b03151c75f6100ca2059fc121e2c4d350a8caf8a4
This commit is contained in:
@ -17,8 +17,40 @@ int cw_in_generic(struct conn *conn,struct cw_action_in * a,uint8_t *data,int le
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
cw_itemstore_t itemstore = conn->incomming;
|
||||
|
||||
cw_itemstore_set(conn->remote,a->item_id,a->itemtype,data,len);
|
||||
switch (a->itemtype) {
|
||||
case CW_ITEMTYPE_BYTE:
|
||||
cw_itemstore_set_byte(itemstore,a->item_id,*data);
|
||||
break;
|
||||
case CW_ITEMTYPE_WORD:
|
||||
cw_itemstore_set_word(itemstore,a->item_id,cw_get_word(data));
|
||||
break;
|
||||
case CW_ITEMTYPE_DWORD:
|
||||
cw_itemstore_set_dword(itemstore,a->item_id,cw_get_dword(data));
|
||||
break;
|
||||
case CW_ITEMTYPE_STR:
|
||||
cw_itemstore_set_strn(itemstore,a->item_id,(char*)data,len);
|
||||
break;
|
||||
case CW_ITEMTYPE_BSTR:
|
||||
cw_itemstore_set_bstrn(itemstore,a->item_id,data,len);
|
||||
break;
|
||||
case CW_ITEMTYPE_DATA:
|
||||
cw_itemstore_set_data(itemstore,a->item_id,data,len);
|
||||
break;
|
||||
case CW_ITEMTYPE_VENDORSTR:
|
||||
cw_itemstore_set_vendorstr(itemstore,a->item_id,
|
||||
cw_get_dword(data),data+4,len-4);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//int src = cw_itemstore_set(conn->incomming,a->item_id,a->itemtype,data,len);
|
||||
|
||||
//printf("Cunint ic: %d %d\n",src,conn->incomming->count);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user