Loading src/authdb.cpp +6 −3 Changes for src/authdb.cpp: 6 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -548,7 +548,8 @@ namespace authdb { bool numeric=true; for(auto t=tmp.begin(); t!=tmp.end(); ++t){ for(auto t=curformdat->Value.begin(); t!=curformdat->Value.end(); ++t){ if(!std::isdigit(*t)){ numeric=false; break; Loading @@ -557,6 +558,7 @@ namespace authdb { if(numeric){ stortype=StorageType::IntStorage; } } Loading Loading @@ -584,7 +586,8 @@ namespace authdb { }else if(dodat.storage==IntStorage){ dodat.datasize=sizeof(int); dodat.data=(char*)new int; memcpy(dodat.data,curformdat->Value.data(), int val=atoi(curformdat->Value.data()); memcpy(dodat.data,&val, dodat.datasize); }else { dodat.datasize=curformdat->Value.size(); Loading Loading @@ -614,7 +617,7 @@ namespace authdb { << "<tr><td><label for=\"domainStorage\">Domain Storage:</label></td>" << "<td><select name=\"domainStorage\">" << "<option value=\"file\">1</option>" << "<option value=\"1\">File</option>" << "</select></td></tr>" << "<tr><td><label for=\"domainOptions\">Domain Options:</label></td>" Loading src/domain.cpp +4 −2 Changes for src/domain.cpp: 4 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -137,7 +137,9 @@ namespace authdb { curdat->Data->type==DataType::DomainData && strcmp(curdat->Data->fieldname,varname)==0){ *varclass=curdat->Data; return *curdat->Data->data; int ret=-1; memcpy(&ret,curdat->Data->data,sizeof(int)); return ret; } } } Loading Loading @@ -234,7 +236,7 @@ bool authdb::Domain::exits(AuthBackend& backend, uuid_t* did, const char* name,i ret=-1; return false; } #include<iostream> void authdb::Domain::info(AuthBackend& backend, class DomainData& dat, size_t& pos){ size_t end=backend.end(); Loading Loading
src/authdb.cpp +6 −3 Changes for src/authdb.cpp: 6 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -548,7 +548,8 @@ namespace authdb { bool numeric=true; for(auto t=tmp.begin(); t!=tmp.end(); ++t){ for(auto t=curformdat->Value.begin(); t!=curformdat->Value.end(); ++t){ if(!std::isdigit(*t)){ numeric=false; break; Loading @@ -557,6 +558,7 @@ namespace authdb { if(numeric){ stortype=StorageType::IntStorage; } } Loading Loading @@ -584,7 +586,8 @@ namespace authdb { }else if(dodat.storage==IntStorage){ dodat.datasize=sizeof(int); dodat.data=(char*)new int; memcpy(dodat.data,curformdat->Value.data(), int val=atoi(curformdat->Value.data()); memcpy(dodat.data,&val, dodat.datasize); }else { dodat.datasize=curformdat->Value.size(); Loading Loading @@ -614,7 +617,7 @@ namespace authdb { << "<tr><td><label for=\"domainStorage\">Domain Storage:</label></td>" << "<td><select name=\"domainStorage\">" << "<option value=\"file\">1</option>" << "<option value=\"1\">File</option>" << "</select></td></tr>" << "<tr><td><label for=\"domainOptions\">Domain Options:</label></td>" Loading
src/domain.cpp +4 −2 Changes for src/domain.cpp: 4 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -137,7 +137,9 @@ namespace authdb { curdat->Data->type==DataType::DomainData && strcmp(curdat->Data->fieldname,varname)==0){ *varclass=curdat->Data; return *curdat->Data->data; int ret=-1; memcpy(&ret,curdat->Data->data,sizeof(int)); return ret; } } } Loading Loading @@ -234,7 +236,7 @@ bool authdb::Domain::exits(AuthBackend& backend, uuid_t* did, const char* name,i ret=-1; return false; } #include<iostream> void authdb::Domain::info(AuthBackend& backend, class DomainData& dat, size_t& pos){ size_t end=backend.end(); Loading