Merge branch 'unstable' into redis_6_merge
Former-commit-id: 07effa392564f3c53989600e803103f3e3951fe7
This commit is contained in:
commit
d73ac7e377
@ -87,7 +87,7 @@ extern "C" char *fetchMOTD(int cache)
|
|||||||
str = sdsnew("");
|
str = sdsnew("");
|
||||||
curl = curl_easy_init();
|
curl = curl_easy_init();
|
||||||
if(curl) {
|
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_FOLLOWLOCATION, 1L); // follow redirects
|
||||||
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 2); // take no more than two seconds
|
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 2); // take no more than two seconds
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, motd_write_callback);
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, motd_write_callback);
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
extern const char *motd_url;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
@ -96,6 +96,8 @@ int spectrum_palette_size;
|
|||||||
|
|
||||||
int g_fInCrash = 0;
|
int g_fInCrash = 0;
|
||||||
|
|
||||||
|
const char *motd_url = "http://api.keydb.dev/motd/motd_cli.txt";
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* Utility functions
|
* Utility functions
|
||||||
*--------------------------------------------------------------------------- */
|
*--------------------------------------------------------------------------- */
|
||||||
|
@ -65,6 +65,7 @@
|
|||||||
#include "motd.h"
|
#include "motd.h"
|
||||||
|
|
||||||
int g_fTestMode = false;
|
int g_fTestMode = false;
|
||||||
|
const char *motd_url = "http://api.keydb.dev/motd/motd_server.txt";
|
||||||
|
|
||||||
/* Our shared "common" objects */
|
/* Our shared "common" objects */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user