Convert RegTokenInfo to a j2s Schema. #1

Closed
jordan wants to merge 14 commits from Telodendria:pull-37 into implement-26
Showing only changes of commit d60aac6d3a - Show all commits

View file

@ -154,13 +154,17 @@ RegTokenFree(RegTokenInfo *tokeninfo)
int int
RegTokenClose(RegTokenInfo * tokeninfo) RegTokenClose(RegTokenInfo * tokeninfo)
{ {
HashMap *json;
if (!tokeninfo) if (!tokeninfo)
{ {
return 0; return 0;
} }
/* Write object to database. */ /* Write object to database. */
DbJsonSet(tokeninfo->ref, RegTokenInfoToJson(tokeninfo)); json = RegTokenInfoToJson(tokeninfo);
DbJsonSet(tokeninfo->ref, json); /* Copies json into internal structure. */
JsonFree(json);
return DbUnlock(tokeninfo->db, tokeninfo->ref); return DbUnlock(tokeninfo->db, tokeninfo->ref);
} }