Loading src/export.cpp +2 −5 Changes for src/export.cpp: 2 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -81,15 +81,12 @@ namespace authdb { json_object_object_add(jrec, "datasize", json_object_new_int64(static_cast<int64_t>(cur->datasize))); json_object_object_add(jrec, "count", json_object_new_int64(static_cast<int64_t>(cur->count))); // Base64 encode the data if (!rawdata.empty()) { netplus::base64 b64; b64 << rawdata; std::string encoded; b64 >> encoded; const std::vector<unsigned char> &enc = b64.encoded(); std::string encoded(enc.begin(), enc.end()); json_object_object_add(jrec, "data", json_object_new_string(encoded.c_str())); } else { Loading src/import.cpp +0 −4 Changes for src/import.cpp: 0 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -57,7 +57,6 @@ namespace authdb { json_object *jstorage = json_object_object_get(jrec, "storage"); json_object *jfieldname = json_object_object_get(jrec, "fieldname"); json_object *jdatasize = json_object_object_get(jrec, "datasize"); json_object *jcount = json_object_object_get(jrec, "count"); json_object *jdata = json_object_object_get(jrec, "data"); if (!jruid || !jtype || !jstorage || !jfieldname) Loading @@ -82,9 +81,6 @@ namespace authdb { memset(rec.fieldname, 0, sizeof(rec.fieldname)); strncpy(rec.fieldname, json_object_get_string(jfieldname), sizeof(rec.fieldname) - 1); if (jcount) rec.count = static_cast<size_t>(json_object_get_int64(jcount)); // Base64 decode the data std::vector<char> rawdata; if (jdata) { Loading Loading
src/export.cpp +2 −5 Changes for src/export.cpp: 2 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -81,15 +81,12 @@ namespace authdb { json_object_object_add(jrec, "datasize", json_object_new_int64(static_cast<int64_t>(cur->datasize))); json_object_object_add(jrec, "count", json_object_new_int64(static_cast<int64_t>(cur->count))); // Base64 encode the data if (!rawdata.empty()) { netplus::base64 b64; b64 << rawdata; std::string encoded; b64 >> encoded; const std::vector<unsigned char> &enc = b64.encoded(); std::string encoded(enc.begin(), enc.end()); json_object_object_add(jrec, "data", json_object_new_string(encoded.c_str())); } else { Loading
src/import.cpp +0 −4 Changes for src/import.cpp: 0 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -57,7 +57,6 @@ namespace authdb { json_object *jstorage = json_object_object_get(jrec, "storage"); json_object *jfieldname = json_object_object_get(jrec, "fieldname"); json_object *jdatasize = json_object_object_get(jrec, "datasize"); json_object *jcount = json_object_object_get(jrec, "count"); json_object *jdata = json_object_object_get(jrec, "data"); if (!jruid || !jtype || !jstorage || !jfieldname) Loading @@ -82,9 +81,6 @@ namespace authdb { memset(rec.fieldname, 0, sizeof(rec.fieldname)); strncpy(rec.fieldname, json_object_get_string(jfieldname), sizeof(rec.fieldname) - 1); if (jcount) rec.count = static_cast<size_t>(json_object_get_int64(jcount)); // Base64 decode the data std::vector<char> rawdata; if (jdata) { Loading