summaryrefslogtreecommitdiff
path: root/src/client/Client.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-12-16 16:38:29 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-12-16 16:38:29 (GMT)
commit0c5e99aef6c997b8bce53189537523e7f742d64b (patch)
treefbe46aa7b53660b6c399728f1adc1504b188dc98 /src/client/Client.cpp
parent00190b4aabad65531ee0e859c3e4f358841238f6 (diff)
parent06f8f88374a1b9e288da30d754ba4bf02768d863 (diff)
downloadpowder-0c5e99aef6c997b8bce53189537523e7f742d64b.zip
powder-0c5e99aef6c997b8bce53189537523e7f742d64b.tar.gz
Merge branch 'master' of github.com:FacialTurd/The-Powder-Toy
Diffstat (limited to 'src/client/Client.cpp')
-rw-r--r--src/client/Client.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/client/Client.cpp b/src/client/Client.cpp
index f46222b..4ec929c 100644
--- a/src/client/Client.cpp
+++ b/src/client/Client.cpp
@@ -431,7 +431,9 @@ std::vector<std::string> Client::DirectorySearch(std::string directory, std::str
findFileHandle = _findfirst(fileMatch.c_str(), &currentFile);
if (findFileHandle == -1L)
{
+#ifdef DEBUG
printf("Unable to open directory\n");
+#endif
return std::vector<std::string>();
}
do
@@ -1308,7 +1310,7 @@ RequestStatus Client::AddComment(int saveID, std::string comment)
if(status!=1)
{
- lastError = ((json::Number)objDocument["Error"]).Value();
+ lastError = ((json::String)objDocument["Error"]).Value();
}
if(status!=1)
@@ -1480,7 +1482,10 @@ RequestStatus Client::UnpublishSave(int saveID)
int status = ((json::Number)objDocument["Status"]).Value();
if(status!=1)
+ {
+ lastError = ((json::String)objDocument["Error"]).Value();
goto failure;
+ }
}
catch (json::Exception &e)
{
@@ -1828,7 +1833,7 @@ Thumbnail * Client::GetThumbnail(int saveID, int saveDate)
//Check active requests for any "forgotten" requests
for(i = 0; i < IMGCONNS; i++)
{
- //If the request is active, and we've recieved a response
+ //If the request is active, and we've received a response
if(activeThumbRequests[i] && http_async_req_status(activeThumbRequests[i]))
{
//If we haven't already, mark the request as completed