4 #include <sys/utsname.h>
7 #include "pbd/compose.h"
8 #include "ardour/callback.h"
12 #define PING_URL "http://ardour.org/pingback/versioncheck"
15 curl_write_data (char *bufptr, size_t size, size_t nitems, void *ptr)
27 call_the_mothership (const string& version)
36 curl_global_init (CURL_GLOBAL_NOTHING);
38 c = curl_easy_init ();
43 data = string_compose ("version=%1&platform=%2 %3 %4", version, utb.sysname, utb.release, utb.machine);
47 data += string_compose ("&watermark=%1", wm);
50 curl_easy_setopt(c, CURLOPT_POSTFIELDS, data.c_str());
51 curl_easy_setopt(c, CURLOPT_URL, PING_URL);
52 curl_easy_setopt(c, CURLOPT_WRITEFUNCTION, curl_write_data);
53 curl_easy_setopt(c, CURLOPT_WRITEDATA, 0);
55 std::cerr << "Callback to ardour.org ...\n";
57 char errbuf[CURL_ERROR_SIZE];
58 curl_easy_setopt(c, CURLOPT_ERRORBUFFER, errbuf);
60 if (curl_easy_perform (c) == 0) {
64 curl_easy_cleanup (c);