diff --git a/apps/aqhome-storage/u_login.c b/apps/aqhome-storage/u_login.c index ccd58c0..7054f97 100644 --- a/apps/aqhome-storage/u_login.c +++ b/apps/aqhome-storage/u_login.c @@ -185,6 +185,7 @@ int _loginUser(AQH_HTTP_URLHANDLER *uh, AQH_HTTP_REQUEST *rq) u=AQH_HttpService_GetUser(sv, userName); if (u==NULL) { DBG_INFO(NULL, "User \"%s\" not found", userName); + /* TODO: sleep */ msgOut=AQH_HttpService_CreateResponseMsg(AQH_HttpUrlHandler_GetHttpService(uh), 401, "Unauthorized", protocol, NULL); AQH_HttpRequest_SetResponseMsg(rq, msgOut); return 0; @@ -193,6 +194,7 @@ int _loginUser(AQH_HTTP_URLHANDLER *uh, AQH_HTTP_REQUEST *rq) i=AQH_User_GetState(u); if (i==AQH_UserState_Suspended) { DBG_INFO(NULL, "User \"%s\" suspended", userName); + /* TODO: sleep */ msgOut=AQH_HttpService_CreateResponseMsg(AQH_HttpUrlHandler_GetHttpService(uh), 401, "Unauthorized", protocol, NULL); AQH_HttpRequest_SetResponseMsg(rq, msgOut); return 0; @@ -204,6 +206,7 @@ int _loginUser(AQH_HTTP_URLHANDLER *uh, AQH_HTTP_REQUEST *rq) msgOut=AQH_HttpService_CreateResponseMsg(AQH_HttpUrlHandler_GetHttpService(uh), 401, "Unauthorized", protocol, "error"); else msgOut=AQH_HttpService_CreateResponseMsg(AQH_HttpUrlHandler_GetHttpService(uh), 500, "Internal Error", protocol, NULL); + /* TODO: sleep */ AQH_HttpRequest_SetResponseMsg(rq, msgOut); return 0; } @@ -211,6 +214,7 @@ int _loginUser(AQH_HTTP_URLHANDLER *uh, AQH_HTTP_REQUEST *rq) session=_generateSessionForUser(sv, u); if (session==NULL) { msgOut=AQH_HttpService_CreateResponseMsg(AQH_HttpUrlHandler_GetHttpService(uh), 500, "Internal Error", protocol, NULL); + /* TODO: sleep */ AQH_HttpRequest_SetResponseMsg(rq, msgOut); return 0; }