git repos / oastat

commit 4e25a4f8

sago007 · 2012-01-20 16:50
4e25a4f812fef1d3eb1120298859ad3b169e6fa2 patch · browse files
parent 9ec6d75af0ca800e4f8186d5f6c9000cf53b8103

Use hashedid if id is not availeble


git-svn-id: http://oastat.googlecode.com/svn/trunk@39 a36be8df-c75f-1e49-46ad-4f0ee64bdc62

Changed files

M src/oss2db/userinfo2db.cpp before
diff --git a/src/oss2db/userinfo2db.cpp b/src/oss2db/userinfo2db.cpp index 92ca34d..54a5bfb 100644 --- a/src/oss2db/userinfo2db.cpp +++ b/src/oss2db/userinfo2db.cpp
@@ -45,11 +45,12 @@ void Userinfo2Db::process(OaStatStruct oss) {
while(clientIdMap.size() < oss.parameters.at(0)+2)
clientIdMap.push_back("");
- if(arguments["id"].length()>0 || arguments["hashedid"].length() > 0) //Not bot
- if(arguments["id"].length()>0)
- clientIdMap[oss.parameters.at(0)] = getHashedId(arguments["id"]);
- else
- clientIdMap[oss.parameters.at(0)] = arguments["hashedid"];
+ if(arguments["id"].length()>0 || arguments["hashedid"].length() > 0) { //Not bot
+ if(arguments["id"].length()>0)
+ clientIdMap[oss.parameters.at(0)] = getHashedId(arguments["id"]);
+ else
+ clientIdMap[oss.parameters.at(0)] = arguments["hashedid"];
+ }
else //bot
{
clientIdMap[oss.parameters.at(0)] = (boost::format("%1%_client%2%") % arguments["n"] % oss.parameters.at(0) ).str();