客户端输入用户名密码登陆后服务器的连续两次响应

返回服务器列表信息:


客户端输入用户名密码登陆后服务器的连续两次响应_第1张图片


客户端输入用户名密码登陆后服务器的连续两次响应_第2张图片


CBalanceSession 返回登陆成功:


bool CBalanceSession::Msg_Handle_OneClientLoginCheck( const char* pMsg, int n32MsgLength, INetSession* vthis, int n32MsgID )
{
    ELOG(LOG_DBBUG, " CBalanceSession::Msg_Handle_OneClientLoginCheck");
    std::auto_ptr<GCToBS::OneClinetLogin> sOneClientLogin(new GCToBS::OneClinetLogin);

    bool bRet = sOneClientLogin->ParseFromArray(pMsg,n32MsgLength);

    if (!bRet){
        ELOG(LOG_ERROR, "Fail with Msg Error.");
        return true;
    }

    LoginUserMap& lAllLoginUserInfo = SdkConnector::GetInstance().GetLoginUserMap();

    string sessionid = "";
    if (sOneClientLogin->plat() == ePlatform_PC){
        stringstream ss;
        ss<<sOneClientLogin->plat();
        ss<<sOneClientLogin->uin();
        ss>>sessionid;
        ELOG(LOG_DBBUG , "meimei    sessionid:%s",sessionid);
    }
    else{
        sessionid = sOneClientLogin->sessionid();
    }
    auto it = lAllLoginUserInfo.find(sessionid);
    if (it != lAllLoginUserInfo.end()){
        sOneClientLogin->set_login_success(true);
        sOneClientLogin->set_uin(it->second.uin);
        lAllLoginUserInfo.erase(it);
        ELOG(LOG_DBBUG, "Erase uid:%s", sOneClientLogin->uin().c_str());
    }
    else{
        ELOG(LOG_WARNNING, "Fail With User with uin(%s) Not Find.", sOneClientLogin->uin().c_str());
        sOneClientLogin->set_login_success(false);
    }

    INetSessionMgr::GetInstance()->SendMsgToSession(ST_SERVER_LS_OnlyBS,vthis->GetID(),*sOneClientLogin, LSToBS::eMsgToBSFromLS_OneClinetLoginCheckRet);

    return true;
}



客户端输入用户名密码登陆后服务器的连续两次响应_第3张图片



FR:海涛高软(hunk Xu) QQ技术交流群:386476712

你可能感兴趣的:(last,battle)