Uses get method if present.
FossilOrigin-Name: 87d238a404f3b06f8165076acb62f3f67830d71b369b13679690764915fccabc
This commit is contained in:
parent
44b5f8561b
commit
04f903633f
@ -36,6 +36,17 @@ int mbag_set_from_buf(mbag_t dst, mbagtype_t type, const char *item_id, uint8_t
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (type->get){
|
||||
struct mbag_item * item = type->get(data,len);
|
||||
if (!item)
|
||||
return 0;
|
||||
item->id=item_id;
|
||||
mbag_set(dst,item);
|
||||
return 1;
|
||||
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user