Ejemplo n.º 1
0
 bool run(const string&, BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result, bool fromRepl) {
     nonce64 n = getNextNonce();
     stringstream ss;
     ss << hex << n;
     result.append("nonce", ss.str() );
     ClientBasic::getCurrent()->resetAuthenticationSession(
             new MongoAuthenticationSession(n));
     return true;
 }
Ejemplo n.º 2
0
Meta* Meta::clone() {
    Meta* ret = new Meta();

    MetInf* retMetInf = new MetInf(getFormat(), getType(), getMark(), getSize(), getAnchor(), getVersion(),
                   getNextNonce(), getMaxMsgSize(), getMaxObjSize(), getEMI(), getMem());
    ret->setMetInf(retMetInf);

    if (retMetInf) {
        delete retMetInf; retMetInf = NULL;
    }

    return ret;

}