Commit 6991cd3f authored by jan.koester's avatar jan.koester
Browse files

test

parent 1a040e46
Loading
Loading
Loading
Loading
Loading
+5 −7
Changes for src/admin.cpp: 5 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -755,8 +755,8 @@ namespace authdb {

                        dodat.datasize=curformdat->Value.size();
                        dodat.data=new char[dodat.datasize];
                        memcpy(dodat.data,curformdat->Value.data(),
                               curformdat->Value.size());
                        std::copy(curformdat->Value.begin(),
                               curformdat->Value.end(),dodat.data);

                        ddat.append(dodat);
                        delete[] dodat.data;
@@ -766,16 +766,15 @@ namespace authdb {
                        dodat.datasize=sizeof(int);
                        dodat.data=(char*)new int;
                        int val=atoi(curformdat->Value.data());
                        memcpy(dodat.data,&val,
                               dodat.datasize);
                        std::copy(&val,&val+sizeof(int),dodat.data);

                        ddat.append(dodat);
                        delete (int*)dodat.data;
                    }else {
                        dodat.datasize=curformdat->Value.size();
                        dodat.data=new char[dodat.datasize];
                        memcpy(dodat.data,curformdat->Value.data(),
                               dodat.datasize);
                        std::copy(curformdat->Value.begin(),
                               curformdat->Value.end(),dodat.data);

                        ddat.append(dodat);
                        delete[] dodat.data;
@@ -783,7 +782,6 @@ namespace authdb {
                }
                Domain domain;
                domain.create(_AdminBackend,&ddat);
                std::cout << "domain created!" << std::endl;
            }

            libhtmlpp::HtmlString form,out;