diff options
Diffstat (limited to 'indra/newview/llflickrconnect.cpp')
-rw-r--r-- | indra/newview/llflickrconnect.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/indra/newview/llflickrconnect.cpp b/indra/newview/llflickrconnect.cpp index 83e4f19191..c0ca5b8cf8 100644 --- a/indra/newview/llflickrconnect.cpp +++ b/indra/newview/llflickrconnect.cpp @@ -86,7 +86,7 @@ void LLFlickrConnect::flickrConnectCoro(std::string requestToken, std::string oa setConnectionState(LLFlickrConnect::FLICKR_CONNECTION_IN_PROGRESS); - LLSD result = httpAdapter->putAndYield(httpRequest, getFlickrConnectURL("/connection"), body, httpOpts); + LLSD result = httpAdapter->putAndSuspend(httpRequest, getFlickrConnectURL("/connection"), body, httpOpts); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -168,9 +168,7 @@ void LLFlickrConnect::flickrShareCoro(LLSD share) httpOpts->setWantHeaders(true); httpOpts->setFollowRedirects(false); - setConnectionState(LLFlickrConnect::FLICKR_POSTING); - - LLSD result = httpAdapter->postAndYield(httpRequest, getFlickrConnectURL("/share/photo", true), share, httpOpts); + LLSD result = httpAdapter->postAndSuspend(httpRequest, getFlickrConnectURL("/share/photo", true), share, httpOpts); if (testShareStatus(result)) { @@ -248,7 +246,7 @@ void LLFlickrConnect::flickrShareImageCoro(LLPointer<LLImageFormatted> image, st body << "\r\n--" << boundary << "--\r\n"; - LLSD result = httpAdapter->postAndYield(httpRequest, getFlickrConnectURL("/share/photo", true), raw, httpOpts, httpHeaders); + LLSD result = httpAdapter->postAndSuspend(httpRequest, getFlickrConnectURL("/share/photo", true), raw, httpOpts, httpHeaders); if (testShareStatus(result)) { @@ -271,7 +269,7 @@ void LLFlickrConnect::flickrDisconnectCoro() setConnectionState(LLFlickrConnect::FLICKR_DISCONNECTING); httpOpts->setFollowRedirects(false); - LLSD result = httpAdapter->deleteAndYield(httpRequest, getFlickrConnectURL("/connection"), httpOpts); + LLSD result = httpAdapter->deleteAndSuspend(httpRequest, getFlickrConnectURL("/connection"), httpOpts); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -306,7 +304,7 @@ void LLFlickrConnect::flickrConnectedCoro(bool autoConnect) httpOpts->setFollowRedirects(false); - LLSD result = httpAdapter->getAndYield(httpRequest, getFlickrConnectURL("/connection", true), httpOpts); + LLSD result = httpAdapter->getAndSuspend(httpRequest, getFlickrConnectURL("/connection", true), httpOpts); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -355,7 +353,7 @@ void LLFlickrConnect::flickrInfoCoro() httpOpts->setWantHeaders(true); httpOpts->setFollowRedirects(false); - LLSD result = httpAdapter->getAndYield(httpRequest, getFlickrConnectURL("/info", true), httpOpts); + LLSD result = httpAdapter->getAndSuspend(httpRequest, getFlickrConnectURL("/info", true), httpOpts); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -471,12 +469,15 @@ void LLFlickrConnect::uploadPhoto(const std::string& image_url, const std::strin body["tags"] = tags; body["safety_level"] = safety_level; + setConnectionState(LLFlickrConnect::FLICKR_POSTING); + LLCoros::instance().launch("LLFlickrConnect::flickrShareCoro", boost::bind(&LLFlickrConnect::flickrShareCoro, this, body)); } void LLFlickrConnect::uploadPhoto(LLPointer<LLImageFormatted> image, const std::string& title, const std::string& description, const std::string& tags, int safety_level) { + setConnectionState(LLFlickrConnect::FLICKR_POSTING); LLCoros::instance().launch("LLFlickrConnect::flickrShareImageCoro", boost::bind(&LLFlickrConnect::flickrShareImageCoro, this, image, |