summaryrefslogtreecommitdiff
path: root/plugins/Dropbox/src/dropbox_commands.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Dropbox/src/dropbox_commands.cpp')
-rw-r--r--plugins/Dropbox/src/dropbox_commands.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/Dropbox/src/dropbox_commands.cpp b/plugins/Dropbox/src/dropbox_commands.cpp
index 10efb39d44..7fef60be45 100644
--- a/plugins/Dropbox/src/dropbox_commands.cpp
+++ b/plugins/Dropbox/src/dropbox_commands.cpp
@@ -79,9 +79,14 @@ void CDropbox::CommandShare(void *arg)
}
ptrA token(db_get_sa(NULL, MODULE, "TokenSecret"));
- //bool useShortUrl = db_get_b(NULL, MODULE, "UseSortLinks", 1) > 0;
- ShareRequest request(token, path);
- NLHR_PTR response(request.Send(param->instance->hNetlibConnection));
+ bool useShortUrl = db_get_b(NULL, MODULE, "UseSortLinks", 1) > 0;
+ HttpRequest *request;
+ if (useShortUrl)
+ request = new ShareOldRequest(token, path);
+ else
+ request = new ShareRequest(token, path);
+ NLHR_PTR response(request->Send(param->instance->hNetlibConnection));
+ delete request;
if (response == NULL || response->resultCode != HTTP_STATUS_OK) {
ProtoBroadcastAck(MODULE, param->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, param->hProcess, 0);