Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions client/LoginHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ _client(client),
_isLoggedIn(false),
_receivedLoginStatus(false),
_componentLogger(componentLogger),
_log("")
_log(""),
_statusText("")
{
}

Expand All @@ -33,7 +34,8 @@ _client(client),
_isLoggedIn(false),
_receivedLoginStatus(false),
_componentLogger(componentLogger),
_log("")
_log(""),
_statusText("")
{
}

Expand Down Expand Up @@ -183,6 +185,7 @@ void LoginHandler::processResponse( const rfa::message::RespMsg& respMsg){
{
_receivedLoginStatus = true;
const rfa::common::RespStatus & status = respMsg.getRespStatus();
_statusText.append(status.getStatusText().c_str());
if (( status.getStreamState() == rfa::common::RespStatus::ClosedEnum ) ||
( status.getStreamState() == rfa::common::RespStatus::ClosedRecoverEnum ) ||
( respMsg.getRespStatus().getStatusCode() == rfa::common::RespStatus::NotAuthorizedEnum))
Expand Down Expand Up @@ -246,3 +249,7 @@ bool LoginHandler::isLoggedIn() const {
bool LoginHandler::receivedLoginStatus() const {
return _receivedLoginStatus;
}

rfa::common::RFA_String LoginHandler::getStatusText() const {
return _statusText;
}
2 changes: 2 additions & 0 deletions client/LoginHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class LoginHandler
bool isLoggedIn() const;
bool receivedLoginStatus() const;
void cleanup();
rfa::common::RFA_String getStatusText() const;

rfa::common::Handle *_pLoginHandle;

Expand All @@ -36,6 +37,7 @@ class LoginHandler
bool _receivedLoginStatus;
rfa::logger::ComponentLogger &_componentLogger;
rfa::common::RFA_String _log;
rfa::common::RFA_String _statusText;
};

#endif
1 change: 1 addition & 0 deletions pyrfa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ void Pyrfa::login(object const &argv1=object(), object const &argv2=object(), ob
if(!_pLoginHandler->isLoggedIn()) {
_log = "[Pyrfa::login] Login failed. Please check data permission. (username: ";
_log.append(_userName.c_str());
_log.append("; statusText: " + _pLoginHandler->getStatusText());
_log.append(")");
_logError(_log.c_str());
//cleanUp();
Expand Down