summaryrefslogtreecommitdiff
path: root/indra/newview/llfacebookconnect.cpp
diff options
context:
space:
mode:
authorGilbert Gonzales <gilbert@lindenlab.com>2013-08-29 16:05:49 -0700
committerGilbert Gonzales <gilbert@lindenlab.com>2013-08-29 16:05:49 -0700
commited828365b8a5371b1deadaa8cc1c2f1fdf729227 (patch)
treeb307a4f3d989b5e5e7fbd4d68a6c3a2afe6e3c65 /indra/newview/llfacebookconnect.cpp
parent357ded33cf48247ce0a305419f9e42c87e19062d (diff)
ACME-866 User receives error when hitting Disconnect in Facebook floater, if access token was cleared manually on backend: Problem was that when the user was already disconnected the Facebook connection state was not being set to disconnected.
Diffstat (limited to 'indra/newview/llfacebookconnect.cpp')
-rw-r--r--indra/newview/llfacebookconnect.cpp25
1 files changed, 18 insertions, 7 deletions
diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp
index abfacdb93c..451c0f5767 100644
--- a/indra/newview/llfacebookconnect.cpp
+++ b/indra/newview/llfacebookconnect.cpp
@@ -190,17 +190,28 @@ public:
LLFacebookConnect::instance().setConnectionState(LLFacebookConnect::FB_DISCONNECTING);
}
+ void setUserDisconnected()
+ {
+ // Clear data
+ LLFacebookConnect::instance().clearInfo();
+ LLFacebookConnect::instance().clearContent();
+ //Notify state change
+ LLFacebookConnect::instance().setConnectionState(LLFacebookConnect::FB_NOT_CONNECTED);
+ }
+
virtual void completed(U32 status, const std::string& reason, const LLSD& content)
{
- if (isGoodStatus(status))
+ if (isGoodStatus(status))
{
LL_DEBUGS("FacebookConnect") << "Disconnect successful. content: " << content << LL_ENDL;
-
- // Clear data
- LLFacebookConnect::instance().clearInfo();
- LLFacebookConnect::instance().clearContent();
- //Notify state change
- LLFacebookConnect::instance().setConnectionState(LLFacebookConnect::FB_NOT_CONNECTED);
+ setUserDisconnected();
+
+ }
+ //User not found so already disconnected
+ else if(status == 404)
+ {
+ LL_DEBUGS("FacebookConnect") << "Already disconnected. content: " << content << LL_ENDL;
+ setUserDisconnected();
}
else
{