summaryrefslogtreecommitdiff
path: root/libs/ardour/soundcloud_upload.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-10-04 14:51:05 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2015-10-04 14:51:05 -0400
commit4dc63966f0872efe768dad61eb9b8785d06b92d1 (patch)
treee54104d57d6c2da7840979181368151fd0819c96 /libs/ardour/soundcloud_upload.cc
parent297e80e020da94a56984b20782584bb1dd96ea34 (diff)
globally remove all trailing whitespace from ardour code base.
Paul Davis was responsible for introducing almost all of this.
Diffstat (limited to 'libs/ardour/soundcloud_upload.cc')
-rw-r--r--libs/ardour/soundcloud_upload.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/libs/ardour/soundcloud_upload.cc b/libs/ardour/soundcloud_upload.cc
index d725614ea7..c7bd4605df 100644
--- a/libs/ardour/soundcloud_upload.cc
+++ b/libs/ardour/soundcloud_upload.cc
@@ -72,7 +72,7 @@ SoundcloudUploader::Get_Auth_Token( std::string username, std::string password )
struct curl_httppost *formpost=NULL;
struct curl_httppost *lastptr=NULL;
- /* Fill in the filename field */
+ /* Fill in the filename field */
curl_formadd(&formpost,
&lastptr,
CURLFORM_COPYNAME, "client_id",
@@ -108,7 +108,7 @@ SoundcloudUploader::Get_Auth_Token( std::string username, std::string password )
headerlist = curl_slist_append(headerlist, "Accept: application/xml");
curl_easy_setopt(curl_handle, CURLOPT_HTTPHEADER, headerlist);
- /* what URL that receives this POST */
+ /* what URL that receives this POST */
std::string url = "https://api.soundcloud.com/oauth2/token";
curl_easy_setopt(curl_handle, CURLOPT_URL, url.c_str());
curl_easy_setopt(curl_handle, CURLOPT_HTTPPOST, formpost);
@@ -170,14 +170,14 @@ SoundcloudUploader::Upload(std::string file_path, std::string title, std::string
struct curl_httppost *lastptr=NULL;
/* Fill in the file upload field. This makes libcurl load data from
- the given file name when curl_easy_perform() is called. */
+ the given file name when curl_easy_perform() is called. */
curl_formadd(&formpost,
&lastptr,
CURLFORM_COPYNAME, "track[asset_data]",
CURLFORM_FILE, file_path.c_str(),
CURLFORM_END);
- /* Fill in the filename field */
+ /* Fill in the filename field */
curl_formadd(&formpost,
&lastptr,
CURLFORM_COPYNAME, "oauth_token",
@@ -205,7 +205,7 @@ SoundcloudUploader::Upload(std::string file_path, std::string title, std::string
/* initalize custom header list (stating that Expect: 100-continue is not
- wanted */
+ wanted */
struct curl_slist *headerlist=NULL;
static const char buf[] = "Expect:";
headerlist = curl_slist_append(headerlist, buf);
@@ -213,7 +213,7 @@ SoundcloudUploader::Upload(std::string file_path, std::string title, std::string
if (curl_handle && multi_handle) {
- /* what URL that receives this POST */
+ /* what URL that receives this POST */
std::string url = "https://api.soundcloud.com/tracks";
curl_easy_setopt(curl_handle, CURLOPT_URL, url.c_str());
// curl_easy_setopt(curl_handle, CURLOPT_VERBOSE, 1L);
@@ -235,7 +235,7 @@ SoundcloudUploader::Upload(std::string file_path, std::string title, std::string
while(still_running) {
struct timeval timeout;
- int rc; /* select() return code */
+ int rc; /* select() return code */
fd_set fdread;
fd_set fdwrite;
@@ -248,7 +248,7 @@ SoundcloudUploader::Upload(std::string file_path, std::string title, std::string
FD_ZERO(&fdwrite);
FD_ZERO(&fdexcep);
- /* set a suitable timeout to play around with */
+ /* set a suitable timeout to play around with */
timeout.tv_sec = 1;
timeout.tv_usec = 0;
@@ -261,33 +261,33 @@ SoundcloudUploader::Upload(std::string file_path, std::string title, std::string
timeout.tv_usec = (curl_timeo % 1000) * 1000;
}
- /* get file descriptors from the transfers */
+ /* get file descriptors from the transfers */
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
/* In a real-world program you OF COURSE check the return code of the
function calls. On success, the value of maxfd is guaranteed to be
greater or equal than -1. We call select(maxfd + 1, ...), specially in
case of (maxfd == -1), we call select(0, ...), which is basically equal
- to sleep. */
+ to sleep. */
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
switch(rc) {
case -1:
- /* select error */
+ /* select error */
break;
case 0:
default:
- /* timeout or readable/writable sockets */
+ /* timeout or readable/writable sockets */
curl_multi_perform(multi_handle, &still_running);
break;
}
- }
+ }
- /* then cleanup the formpost chain */
+ /* then cleanup the formpost chain */
curl_formfree(formpost);
- /* free slist */
+ /* free slist */
curl_slist_free_all (headerlist);
}