13
0

quick hack to test SSL in bundles

this needs to be reverted, and we need a proper curl wrapper,
shared by video-timeline AND freesound moocher
This commit is contained in:
Robin Gareus 2016-07-17 17:03:48 +02:00
parent 3458844878
commit 9c2682d6f1
2 changed files with 15 additions and 2 deletions

View File

@ -39,6 +39,7 @@
#include "time_axis_view.h"
#include "selection.h"
#include "script_selector.h"
#include "utils_videotl.h"
#include "pbd/i18n.h"
@ -345,6 +346,17 @@ const char *luasignalstr[] = {
#undef ENGINE
}; // namespace
std::string lua_http_get (const char *u) {
char *rv = a3_curl_http_get (u, NULL);
if (!rv) {
return "";
}
std::string s (rv);
free (rv);
return s;
}
////////////////////////////////////////////////////////////////////////////////
#define xstr(s) stringify(s)
@ -537,6 +549,8 @@ LuaInstance::register_classes (lua_State* L)
luabridge::getGlobalNamespace (L)
.beginNamespace ("ArdourUI")
.addFunction ("curl_http_get", &lua_http_get)
.beginStdList <ArdourMarker*> ("ArdourMarkerList")
.endClass ()

View File

@ -337,8 +337,7 @@ extern "C" {
struct A3MemoryStruct chunk;
long int httpstatus;
if (status) *status = 0;
//Glib::usleep(500000); return NULL; // TEST & DEBUG
if (strncmp("http://", u, 7)) return NULL;
if (strncmp("http://", u, 7) && strncmp("https://", u, 8)) return NULL;
chunk.data=NULL;
chunk.size=0;