projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
if a request to reset the speed to zero as the default arrives when stopped, reset...
[ardour.git]
/
libs
/
ardour
/
callback.cc
diff --git
a/libs/ardour/callback.cc
b/libs/ardour/callback.cc
index 3a66836748ffa4cb47b3179b603ffb326ab24d8e..68427551911686bf99c4bb44679bae5cfd26c472 100644
(file)
--- a/
libs/ardour/callback.cc
+++ b/
libs/ardour/callback.cc
@@
-16,7
+16,6
@@
#include "pbd/strsplit.h"
#include "pbd/convert.h"
#include "pbd/strsplit.h"
#include "pbd/convert.h"
-#include "ardour/callback.h"
#include "ardour/filesystem_paths.h"
using namespace std;
#include "ardour/filesystem_paths.h"
using namespace std;
@@
-53,7
+52,7
@@
watermark ()
void
block_mothership ()
{
void
block_mothership ()
{
- string hangup = Glib::build_filename (ARDOUR::user_config_directory()
.to_string()
, OFF_THE_HOOK);
+ string hangup = Glib::build_filename (ARDOUR::user_config_directory(), OFF_THE_HOOK);
int fd;
if ((fd = ::open (hangup.c_str(), O_RDWR|O_CREAT, 0600)) >= 0) {
close (fd);
int fd;
if ((fd = ::open (hangup.c_str(), O_RDWR|O_CREAT, 0600)) >= 0) {
close (fd);
@@
-63,21
+62,21
@@
block_mothership ()
void
unblock_mothership ()
{
void
unblock_mothership ()
{
- string hangup = Glib::build_filename (ARDOUR::user_config_directory()
.to_string()
, OFF_THE_HOOK);
+ string hangup = Glib::build_filename (ARDOUR::user_config_directory(), OFF_THE_HOOK);
::unlink (hangup.c_str());
}
bool
mothership_blocked ()
{
::unlink (hangup.c_str());
}
bool
mothership_blocked ()
{
- string hangup = Glib::build_filename (ARDOUR::user_config_directory()
.to_string()
, OFF_THE_HOOK);
+ string hangup = Glib::build_filename (ARDOUR::user_config_directory(), OFF_THE_HOOK);
return Glib::file_test (hangup, Glib::FILE_TEST_EXISTS);
}
void
call_the_mothership (const string& version)
{
return Glib::file_test (hangup, Glib::FILE_TEST_EXISTS);
}
void
call_the_mothership (const string& version)
{
- /* check if the user says never to do this
+ /* check if the user says never to do this
*/
if (mothership_blocked()) {
*/
if (mothership_blocked()) {
@@
-91,7
+90,7
@@
call_the_mothership (const string& version)
if (uname (&utb)) {
return;
}
if (uname (&utb)) {
return;
}
-
+
curl_global_init (CURL_GLOBAL_NOTHING);
c = curl_easy_init ();
curl_global_init (CURL_GLOBAL_NOTHING);
c = curl_easy_init ();
@@
-105,26
+104,26
@@
call_the_mothership (const string& version)
if (!wm.empty()) {
data += string_compose ("&watermark=%1", wm);
}
if (!wm.empty()) {
data += string_compose ("&watermark=%1", wm);
}
-
+
curl_easy_setopt(c, CURLOPT_POSTFIELDS, data.c_str());
curl_easy_setopt(c, CURLOPT_URL, PING_URL);
curl_easy_setopt(c, CURLOPT_POSTFIELDS, data.c_str());
curl_easy_setopt(c, CURLOPT_URL, PING_URL);
- curl_easy_setopt(c, CURLOPT_WRITEFUNCTION, curl_write_data);
- curl_easy_setopt(c, CURLOPT_WRITEDATA, &versionstr);
-
+ curl_easy_setopt(c, CURLOPT_WRITEFUNCTION, curl_write_data);
+ curl_easy_setopt(c, CURLOPT_WRITEDATA, &versionstr);
+
std::cerr << "Callback to ardour.org ...\n";
char errbuf[CURL_ERROR_SIZE];
std::cerr << "Callback to ardour.org ...\n";
char errbuf[CURL_ERROR_SIZE];
- curl_easy_setopt(c, CURLOPT_ERRORBUFFER, errbuf);
+ curl_easy_setopt(c, CURLOPT_ERRORBUFFER, errbuf);
if (curl_easy_perform (c) == 0) {
cerr << "Current release is " << versionstr << endl;
vector<string> ours;
vector<string> current;
if (curl_easy_perform (c) == 0) {
cerr << "Current release is " << versionstr << endl;
vector<string> ours;
vector<string> current;
-
+
split (version, ours, '.');
split (versionstr, current, '.');
split (version, ours, '.');
split (versionstr, current, '.');
-
+
if (ours.size() == 3 && current.size() == 3) {
int ours_n[3];
if (ours.size() == 3 && current.size() == 3) {
int ours_n[3];
@@
-141,7
+140,7
@@
call_the_mothership (const string& version)
current_n[2] = atoi (current[2]);
if (ours_n[0] < current_n[0] ||
current_n[2] = atoi (current[2]);
if (ours_n[0] < current_n[0] ||
- ((ours_n[0] == current_n[0]) && (ours_n[1] < current_n[1])) ||
+ ((ours_n[0] == current_n[0]) && (ours_n[1] < current_n[1])) ||
((ours_n[0] == current_n[0]) && (ours_n[1] == current_n[1]) && (ours_n[2] < current_n[2]))) {
cerr << "TOO OLD\n";
} else {
((ours_n[0] == current_n[0]) && (ours_n[1] == current_n[1]) && (ours_n[2] < current_n[2]))) {
cerr << "TOO OLD\n";
} else {
@@
-151,6
+150,6
@@
call_the_mothership (const string& version)
cerr << "Unusual local version: " << version << endl;
}
}
cerr << "Unusual local version: " << version << endl;
}
}
-
+
curl_easy_cleanup (c);
}
curl_easy_cleanup (c);
}