mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
check HTTP status after ping, and use https by default
git-svn-id: svn://localhost/ardour2/branches/3.0@14191 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
cfacfe025b
commit
ed5ff77313
1 changed files with 10 additions and 2 deletions
|
|
@ -92,9 +92,9 @@ _pingback (void *arg)
|
||||||
string url;
|
string url;
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
url = "http://community.ardour.org/pingback/osx/";
|
url = "https://community.ardour.org/pingback/osx/";
|
||||||
#else
|
#else
|
||||||
url = "http://community.ardour.org/pingback/linux/";
|
url = "https://community.ardour.org/pingback/linux/";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char* v = curl_easy_escape (c, cm->version.c_str(), cm->version.length());
|
char* v = curl_easy_escape (c, cm->version.c_str(), cm->version.length());
|
||||||
|
|
@ -130,6 +130,14 @@ _pingback (void *arg)
|
||||||
return_str = "";
|
return_str = "";
|
||||||
|
|
||||||
if (curl_easy_perform (c) == 0) {
|
if (curl_easy_perform (c) == 0) {
|
||||||
|
int http_status;
|
||||||
|
|
||||||
|
curl_easy_getinfo (c, CURLINFO_RESPONSE_CODE, &http_status);
|
||||||
|
|
||||||
|
if (http_status != 200) {
|
||||||
|
std::cerr << "Bad HTTP status" << std::endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if ( return_str.length() > 140 ) { // like a tweet :)
|
if ( return_str.length() > 140 ) { // like a tweet :)
|
||||||
std::cerr << "Announcement string is too long (probably behind a proxy)." << std::endl;
|
std::cerr << "Announcement string is too long (probably behind a proxy)." << std::endl;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue