PulleyBack: call Instance::add() with data passed in from Squeal. Needs to be reencod...
authorAdriaan de Groot <groot@kde.org>
Thu, 11 Aug 2016 22:19:53 +0000 (00:19 +0200)
committerAdriaan de Groot <groot@kde.org>
Thu, 11 Aug 2016 22:19:53 +0000 (00:19 +0200)
src/pulley/pulleyscript/parserpp.cpp

index 4159cc9..0e738d4 100644 (file)
@@ -479,6 +479,15 @@ static void ceebee(void *cbdata, int add_not_del, int numactpart, struct squeal_
 {
        auto& log = SteamWorks::Logging::getLogger("steamworks.pulleyscript");
        log.debugStream() << "Callback called " << cbdata << ' ' << add_not_del << ' ' << numactpart;
+
+       auto instance = reinterpret_cast<SteamWorks::PulleyBack::Instance*>(cbdata);
+       log.debugStream() << "  .. name=" << instance->name() << " valid=" << instance->is_valid();
+
+       if (add_not_del)
+       {
+               // TODO: re-encode everything as DER instead of casting it
+               instance->add(nullptr);
+       }
 }
 
 std::forward_list< SteamWorks::PulleyScript::BackendParameters > SteamWorks::PulleyScript::Parser::Private::find_backends()