X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fsoundcloud_upload.cc;h=3c05b5aa78a69cdf06a2b52b2afcb5eb040e5575;hb=910e93470fb80e2f378106bb89598c05cc20c2cb;hp=68ab2fa2f6600db6051019a56e9ec20761dfb4dc;hpb=2397429e99d4b79ae874392665db2627674daaa0;p=ardour.git diff --git a/libs/ardour/soundcloud_upload.cc b/libs/ardour/soundcloud_upload.cc index 68ab2fa2f6..3c05b5aa78 100644 --- a/libs/ardour/soundcloud_upload.cc +++ b/libs/ardour/soundcloud_upload.cc @@ -31,11 +31,11 @@ #include #include "pbd/gstdio_compat.h" -#include "i18n.h" +#include "pbd/i18n.h" using namespace PBD; -size_t +static size_t WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data) { register int realsize = (int)(size * nmemb); @@ -52,6 +52,8 @@ WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data) } SoundcloudUploader::SoundcloudUploader() +: errorBuffer() +, caller(0) { curl_handle = curl_easy_init(); multi_handle = curl_multi_init(); @@ -118,7 +120,7 @@ SoundcloudUploader::Get_Auth_Token( std::string username, std::string password ) // perform online request CURLcode res = curl_easy_perform(curl_handle); if (res != 0) { - DEBUG_TRACE (DEBUG::Soundcloud, string_compose ("curl error %1 (%2)", res, curl_easy_strerror(res) ) ); + DEBUG_TRACE (DEBUG::Soundcloud, string_compose ("curl error %1 (%2)\n", res, curl_easy_strerror(res) ) ); return ""; } @@ -146,7 +148,7 @@ int SoundcloudUploader::progress_callback(void *caller, double dltotal, double dlnow, double ultotal, double ulnow) { SoundcloudUploader *scu = (SoundcloudUploader *) caller; - DEBUG_TRACE (DEBUG::Soundcloud, string_compose ("%1: uploaded %2 of %3", scu->title, ulnow, ultotal) ); + DEBUG_TRACE (DEBUG::Soundcloud, string_compose ("%1: uploaded %2 of %3\n", scu->title, ulnow, ultotal) ); scu->caller->SoundcloudProgress(ultotal, ulnow, scu->title); /* EMIT SIGNAL */ return 0; } @@ -302,19 +304,19 @@ SoundcloudUploader::Upload(std::string file_path, std::string title, std::string XMLNode *root = doc.root(); if (!root) { - DEBUG_TRACE (DEBUG::Soundcloud, "no root XML node!"); + DEBUG_TRACE (DEBUG::Soundcloud, "no root XML node!\n"); return ""; } XMLNode *url_node = root->child("permalink-url"); if (!url_node) { - DEBUG_TRACE (DEBUG::Soundcloud, "no child node \"permalink-url\" found!"); + DEBUG_TRACE (DEBUG::Soundcloud, "no child node \"permalink-url\" found!\n"); return ""; } XMLNode *text_node = url_node->child("text"); if (!text_node) { - DEBUG_TRACE (DEBUG::Soundcloud, "no text node found!"); + DEBUG_TRACE (DEBUG::Soundcloud, "no text node found!\n"); return ""; }