Hi,
I'm trying to experiment with various svr databases and running into
trouble.
My understanding is that I should be able to provisioning a client and a
server statically, by writing the appropriate JSON config file and using
json2cbor to create a dat file to be ingested at startup.
However, I'm finding that my .dat files always get overwritten by the
default svr database.
Running cbordump on the original .dat file and the created default .dat
file shows different formats. The generated file seems to use bytestrings
for everything.
For example, during init processing, initDoxmResource (doxmresource.c)
calls GetSecureVirtualDatabaseFromPS (psinterface.c), which opens my .dat
file and finds the doxm key. However, it only sets the result if the value
is a bytestring:
CborError cborFindResult = cbor_value_map_find_value(&cbor,
rsrcName, &cborValue);
if (CborNoError == cborFindResult &&
cbor_value_is_byte_string(&cborValue))
{
cborFindResult = cbor_value_dup_byte_string(&cborValue,
data, size, NULL);
VERIFY_SUCCESS(TAG, CborNoError==cborFindResult, ERROR);
ret = OC_STACK_OK;
}
(here rsrcName is "doxm"). But in fact the found value is a map.
So I'm very confused about how all this is supposed to work and would
appreciate any guidance.
Thanks,
Gregg
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160928/7a33e150/attachment.html>