From 1b8755a0e0cbb12421cfe4ed636db043ab77940b Mon Sep 17 00:00:00 2001 From: Damiano Boppart Date: Mon, 3 Apr 2017 17:42:36 +0200 Subject: [PATCH 1/2] Fix compilation on openSUSE --- server/function_map.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/function_map.hh b/server/function_map.hh index c2a8c9d..5f0d045 100644 --- a/server/function_map.hh +++ b/server/function_map.hh @@ -116,7 +116,7 @@ struct Out typedef T* c_type; // the according type in C function parameter enum { is_output = true, need_input = NeedInput }; // if need_input=false it would no longer consume an element in the input parameter array. - explicit Out() : value{ new T{} } + Out() : value{ new T{} } { if(typeid(T)==typeid(_message*)) { From 264369468ad5749c2026d4b8429d6e3a8f703086 Mon Sep 17 00:00:00 2001 From: Roker Date: Thu, 6 Apr 2017 20:50:04 +0200 Subject: [PATCH 2/2] add 'null' value when stringlist->value is NULL. Might fix JSON-24. --- server/pep-types.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/server/pep-types.cc b/server/pep-types.cc index b049e73..744d8f4 100644 --- a/server/pep-types.cc +++ b/server/pep-types.cc @@ -497,8 +497,13 @@ js::Value to_json(stringlist_t* const& osl) while(sl) { - std::string value = sl->value; - a.push_back( std::move(value) ); + if(sl->value) + { + std::string value = sl->value; + a.push_back( std::move(value) ); + }else{ + a.push_back( js::Value{} ); // add 'null' value, might fix JSON-24. + } sl = sl->next; }