优化代码

This commit is contained in:
xiongziliang
2018-11-27 11:05:44 +08:00
parent 858d2996c4
commit ad25ea184c
8 changed files with 16 additions and 16 deletions

View File

@@ -101,7 +101,7 @@ string FindField(const char* buf, const char* start, const char *end,int bufSize
struct StrCaseCompare
{
bool operator()(const string& __x, const string& __y) const
{return toolkit::strcasecmp(__x.data(), __y.data()) < 0 ;}
{return strcasecmp(__x.data(), __y.data()) < 0 ;}
};
typedef map<string,string,StrCaseCompare> StrCaseMap;

View File

@@ -444,7 +444,7 @@ void RtspSession::onAuthDigest(const weak_ptr<RtspSession> &weakSelf,const strin
}
auto good_response = MD5( encrypted_pwd + ":" + nonce + ":" + MD5(string("DESCRIBE") + ":" + uri).hexdigest()).hexdigest();
if(toolkit::strcasecmp(good_response.data(),response.data()) == 0){
if(strcasecmp(good_response.data(),response.data()) == 0){
//认证成功md5不区分大小写
onAuthSuccess(weakSelf);
TraceL << "onAuthSuccess";