Skip to content

Commit

Permalink
Development/comrpc metadata (#848)
Browse files Browse the repository at this point in the history
* [Containers] Adjust to API changes

* [CONTAINERS] Get the containers working *with* the compositor as well..

* [COMRPC] Give the COMRPC servers a name, so thay are identified for metadata handling.

* Update Compositor.cpp

* Update Compositor.cpp

* [WINDOWS] Fix warnings in windows.

---------

Co-authored-by: sebaszm <[email protected]>
  • Loading branch information
pwielders and sebaszm authored Nov 12, 2024
1 parent ff5586e commit 6a30cc3
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Compositor/lib/Mesa/Compositor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ namespace Plugin {
const std::string& proxyStubPath,
Exchange::IComposition::IDisplay* parentInterface,
const Core::ProxyType<RPC::InvokeServer>& engine)
: RPC::Communicator("Compositor", source, proxyStubPath, Core::ProxyType<Core::IIPCServer>(engine))
: RPC::Communicator(source, proxyStubPath, Core::ProxyType<Core::IIPCServer>(engine), _T("@Compositor"))
, _parentInterface(parentInterface)
{
if (_parentInterface != nullptr) {
Expand Down
8 changes: 4 additions & 4 deletions NetworkControl/NetworkControlImplementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1315,19 +1315,19 @@ namespace Plugin
if (file.IsValid() == false) {
SYSLOG(Logging::Notification, (_T("DNS functionality could NOT be updated [%s]"), _dnsFile.c_str()));
} else {
uint32_t offset = file.Size();
uint32_t offset = static_cast<uint32_t>(file.Size());
string startMarker((_T("#++SECTION: ")) + _service->Callsign() + '\n');
string endMarker((_T("#--SECTION: ")) + _service->Callsign() + '\n');

if (offset > 0) {
uint32_t start = static_cast<uint32_t>(file.Search(0, reinterpret_cast<const uint8_t*>(startMarker.c_str()), startMarker.length()));
uint32_t start = static_cast<uint32_t>(file.Search(0, reinterpret_cast<const uint8_t*>(startMarker.c_str()), static_cast<uint32_t>(startMarker.length())));

if (start < file.Size()) {
// We found a start marker, see if we have an end marker.
uint32_t end = static_cast<uint32_t>(file.Search(start + startMarker.length(), reinterpret_cast<const uint8_t*>(endMarker.c_str()), endMarker.length()));
uint32_t end = static_cast<uint32_t>(file.Search(start + startMarker.length(), reinterpret_cast<const uint8_t*>(endMarker.c_str()), static_cast<uint32_t>(endMarker.length())));

if (end < file.Size()) {
end += endMarker.length();
end += static_cast<uint32_t>(endMarker.length());
offset -= (end - start);

if (offset > start) {
Expand Down
2 changes: 1 addition & 1 deletion Svalbard/CryptographyRPC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace Plugin {
CryptographyImplementation* parent,
const string& proxyStubPath,
const Core::ProxyType<RPC::InvokeServer>& engine)
: RPC::Communicator(source, proxyStubPath, Core::ProxyType<Core::IIPCServer>(engine))
: RPC::Communicator(source, proxyStubPath, Core::ProxyType<Core::IIPCServer>(engine), _T("@Svalbard"))
, _parent(*parent)
{
Open(Core::infinite);
Expand Down
2 changes: 1 addition & 1 deletion examples/OutOfProcessPlugin/OutOfProcessImplementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ POP_WARNING()
Exchange::IBrowser* parentInterface,
const string& proxyStubPath,
const Core::ProxyType<RPC::InvokeServer> & engine)
: RPC::Communicator(source, proxyStubPath, Core::ProxyType<Core::IIPCServer>(engine))
: RPC::Communicator(source, proxyStubPath, Core::ProxyType<Core::IIPCServer>(engine), _T("@OutOfProcessPlugin"))
, _parentInterface(parentInterface)
{
Open(Core::infinite);
Expand Down
3 changes: 2 additions & 1 deletion examples/SimpleCOMRPCServer/SimpleCOMRPCServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ POP_WARNING()
: RPC::Communicator(
source,
proxyServerPath,
Core::ProxyType<Core::IIPCServer>(engine))
Core::ProxyType<Core::IIPCServer>(engine),
_T("@SimpleComServer"))
, _remoteEntry(nullptr)
{
// Once the socket is opened the first exchange between client and server is an
Expand Down

0 comments on commit 6a30cc3

Please sign in to comment.