diff options
author | philippe colliot <philippe.colliot@mpsa.com> | 2014-04-04 18:22:42 +0200 |
---|---|---|
committer | philippe colliot <philippe.colliot@mpsa.com> | 2014-04-04 18:22:42 +0200 |
commit | 241cadf66ec5f792bc4c3d545acade4eedad7def (patch) | |
tree | e32ef330e0e5071b4563a156de97d273e04cea68 /src/patches | |
parent | fbbad6a8c1bea3f2539b560db4593235281344d5 (diff) | |
download | navigation-241cadf66ec5f792bc4c3d545acade4eedad7def.tar.gz |
push missing patches
Diffstat (limited to 'src/patches')
-rw-r--r-- | src/patches/amb_allow_sessionbus.patch | 124 | ||||
-rw-r--r-- | src/patches/layer_management_cast_fix.patch | 13 |
2 files changed, 137 insertions, 0 deletions
diff --git a/src/patches/amb_allow_sessionbus.patch b/src/patches/amb_allow_sessionbus.patch new file mode 100644 index 0000000..d9b77c8 --- /dev/null +++ b/src/patches/amb_allow_sessionbus.patch @@ -0,0 +1,124 @@ +diff --git a/plugins/dbus/abstractdbusinterface.cpp b/plugins/dbus/abstractdbusinterface.cpp +index 9dd8566..19ef606 100644 +--- a/plugins/dbus/abstractdbusinterface.cpp ++++ b/plugins/dbus/abstractdbusinterface.cpp +@@ -17,6 +17,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + + #include "abstractdbusinterface.h" ++#include "dbusplugin.h" + + #include <abstractroutingengine.h> + #include <debugout.h> +@@ -37,7 +38,7 @@ list<string> AbstractDBusInterface::mimplementedProperties; + const uint getPid(const char *owner) + { + GError* error = nullptr; +- GDBusProxy* dbus = g_dbus_proxy_new_for_bus_sync(G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_NONE, NULL, ++ GDBusProxy* dbus = g_dbus_proxy_new_for_bus_sync(bustype, G_DBUS_PROXY_FLAGS_NONE, NULL, + "org.freedesktop.DBus", + "/", + "org.freedesktop.DBus", +diff --git a/plugins/dbus/automotivemanager.cpp b/plugins/dbus/automotivemanager.cpp +index b5fb149..edbe1bd 100644 +--- a/plugins/dbus/automotivemanager.cpp ++++ b/plugins/dbus/automotivemanager.cpp +@@ -1,3 +1,4 @@ ++#include "dbusplugin.h" + #include "automotivemanager.h" + #include "abstractdbusinterface.h" + #include "listplusplus.h" +@@ -341,7 +342,7 @@ static void signalCallback( GDBusConnection *connection, + AbstractDBusInterface* iface = i.first; + for(auto n : i.second) + { +- if(n == name) ++ if(n == name && !persistent) + { + DebugOut()<<"unreferencing "<<n<<" from the subscription of "<<iface->objectPath()<<endl; + manager->subscribedProcesses[iface].remove(n); +@@ -398,7 +399,7 @@ AutomotiveManager::AutomotiveManager(GDBusConnection *connection) + + g_assert(regId > 0); + +- g_dbus_connection_signal_subscribe(g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL,NULL), "org.freedesktop.DBus", "org.freedesktop.DBus", ++ g_dbus_connection_signal_subscribe(g_bus_get_sync(bustype, NULL,NULL), "org.freedesktop.DBus", "org.freedesktop.DBus", + "NameOwnerChanged", "/org/freedesktop/DBus", NULL, G_DBUS_SIGNAL_FLAGS_NONE, + signalCallback, this, NULL); + } +diff --git a/plugins/dbus/dbusinterfacemanager.cpp b/plugins/dbus/dbusinterfacemanager.cpp +index 0c8a645..07e6786 100644 +--- a/plugins/dbus/dbusinterfacemanager.cpp ++++ b/plugins/dbus/dbusinterfacemanager.cpp +@@ -236,7 +236,7 @@ on_name_lost (GDBusConnection *connection, const gchar *name, gpointer user_data + DBusInterfaceManager::DBusInterfaceManager(AbstractRoutingEngine* engine,std::map<std::string,std::string> config) + :AbstractSink(engine,config),re(engine), connection(nullptr) + { +- ownerId = g_bus_own_name(G_BUS_TYPE_SYSTEM, ++ ownerId = g_bus_own_name(bustype, + DBusServiceName, + G_BUS_NAME_OWNER_FLAGS_NONE, + on_bus_acquired, +diff --git a/plugins/dbus/dbusplugin.cpp b/plugins/dbus/dbusplugin.cpp +index 7fa31c1..0b75d69 100644 +--- a/plugins/dbus/dbusplugin.cpp ++++ b/plugins/dbus/dbusplugin.cpp +@@ -24,8 +24,21 @@ + #include "debugout.h" + #include "listplusplus.h" + ++bool persistent=false; ++GBusType bustype=G_BUS_TYPE_SYSTEM; ++ + extern "C" AbstractSinkManager * create(AbstractRoutingEngine* routingengine, map<string, string> config) + { ++ if(config.find("sessionbus") != config.end()) ++ { ++ bustype=G_BUS_TYPE_SESSION; ++ } ++ ++ if(config.find("persistent") != config.end()) ++ { ++ persistent=true; ++ } ++ + return new DBusSinkManager(routingengine, config); + } + +diff --git a/plugins/dbus/dbusplugin.h b/plugins/dbus/dbusplugin.h +index 337f2f6..92e6255 100644 +--- a/plugins/dbus/dbusplugin.h ++++ b/plugins/dbus/dbusplugin.h +@@ -29,6 +29,9 @@ + + typedef std::map<VehicleProperty::Property, VariantType*> PropertyDBusMap; + ++extern GBusType bustype; ++extern bool persistent; ++ + class DBusSink : public AbstractSink, public AbstractDBusInterface + { + +diff --git a/tests/amb-get b/tests/amb-get +index 0835a64..7fb48ea 100755 +--- a/tests/amb-get ++++ b/tests/amb-get +@@ -5,12 +5,17 @@ import sys + import argparse + + parser = argparse.ArgumentParser() ++parser.add_argument("--sessionbus", help="use session bus", action='store_true') + parser.add_argument("get", help="get {objectName}") + args = parser.parse_args() + + objectName = args.get + +-bus = dbus.SystemBus() ++if (args.sessionbus): ++ bus = dbus.SessionBus() ++else: ++ bus = dbus.SystemBus() ++ + managerObject = bus.get_object("org.automotive.message.broker", "/"); + managerInterface = dbus.Interface(managerObject, "org.automotive.Manager") + diff --git a/src/patches/layer_management_cast_fix.patch b/src/patches/layer_management_cast_fix.patch new file mode 100644 index 0000000..df3dee7 --- /dev/null +++ b/src/patches/layer_management_cast_fix.patch @@ -0,0 +1,13 @@ +diff --git a/LayerManagerPlugins/Renderers/Platform/X11GLESRenderer/src/X11GLESRenderer.cpp b/LayerManagerPlugins/Renderers/Platform/X11GLESRenderer/src/X11GLESRenderer.cpp +index 2d9b0a9..09ffd43 100644 +--- a/LayerManagerPlugins/Renderers/Platform/X11GLESRenderer/src/X11GLESRenderer.cpp ++++ b/LayerManagerPlugins/Renderers/Platform/X11GLESRenderer/src/X11GLESRenderer.cpp +@@ -46,7 +46,7 @@ bool X11GLESRenderer::start(int width, int height, const char* displayname) + m_pWindowSystem = new X11WindowSystem(displayname, width, height, m_pScene); + m_pGraphicSystem = new GLESGraphicsystem(width,height, ShaderProgramGLES::createProgram); + +- if (!m_pWindowSystem->init(m_pGraphicSystem)) ++ if (!m_pWindowSystem->init((BaseGraphicSystem<_XDisplay*, long unsigned int>*)m_pGraphicSystem)) + { + goto fail; // TODO bad style + } |