Uses get method if present.

FossilOrigin-Name: 87d238a404f3b06f8165076acb62f3f67830d71b369b13679690764915fccabc
This commit is contained in:
7u83@mail.ru 2016-03-28 14:46:38 +00:00
parent 44b5f8561b
commit 04f903633f

View File

@ -36,6 +36,17 @@ int mbag_set_from_buf(mbag_t dst, mbagtype_t type, const char *item_id, uint8_t
return 1; 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; return 0;
} }