Merge branch 'unstable' into redis_6_merge

Former-commit-id: 07effa392564f3c53989600e803103f3e3951fe7
This commit is contained in:
John Sully 2020-03-15 18:33:24 -04:00
commit d73ac7e377
4 changed files with 6 additions and 1 deletions

View File

@ -87,7 +87,7 @@ extern "C" char *fetchMOTD(int cache)
str = sdsnew("");
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://api.keydb.dev/motd/motd.txt");
curl_easy_setopt(curl, CURLOPT_URL, motd_url);
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); // follow redirects
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 2); // take no more than two seconds
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, motd_write_callback);

View File

@ -1,5 +1,7 @@
#pragma once
extern const char *motd_url;
#ifdef __cplusplus
extern "C" {
#endif

View File

@ -96,6 +96,8 @@ int spectrum_palette_size;
int g_fInCrash = 0;
const char *motd_url = "http://api.keydb.dev/motd/motd_cli.txt";
/*------------------------------------------------------------------------------
* Utility functions
*--------------------------------------------------------------------------- */

View File

@ -65,6 +65,7 @@
#include "motd.h"
int g_fTestMode = false;
const char *motd_url = "http://api.keydb.dev/motd/motd_server.txt";
/* Our shared "common" objects */