It is possible for more than one message to be delivered concurrently.
When this happens, messages are concatenated together (end-to-end).
Current code errors out if the total received data is larger than the
known header_size (4) + the body size (reported in the header).
However, when >=2 messages arrive at the same time, the total received
data will be far greater than this.
The current code base actually handles multiple messages perfectly
already, so all we need to do is remove the early return and
everything "just works".
Signed-off-by: Lee Jones <lee.jones@linaro.org>
This will make the *.entries files the the authoritative place to
define additional GL function prototypes. All generated header
files are now placed inside the build directory so that nobody
will ever try to touch them again.
Previously, the resource directory is generated from `SNAP` if set,
`/usr/share/anbox` is used otherwise. This cannot work with binaries
installed via `make install` since the loading screen is mostly at
`/usr/local/share/anbox/ui/loading-screen.png`.
With this patch, anbox can get correct resource directory when it's
installed without snap.
Before we were waiting forever for a reply which never occured in some
cases due to errors when processing incoming protobuf messages we now
abort the RPC call after a timeout of five seconds to keep operational.
In CMakeLists.txt, it already defines:
if (ANBOX_VERSION_SUFFIX)
set(ANBOX_VERSION "${ANBOX_VERSION}-${ANBOX_VERSION_SUFFIX}")
endif()
So there's no need to add suffix again in code
Signed-off-by: Shengjing Zhu <i@zhsj.me>
From the Porting to GCC 7[1] page:
> Several C++ Standard Library headers have been changed to no longer include
> the `<functional>` header. As such, C++ programs that used components defined
> in `<functional>` without explicitly including that header will no longer
> compile.
> Previously components such as std::bind and std::function were
> implicitly defined after including unrelated headers such as `<memory>`,
> `<future>`, `<mutex>`, and `<regex>`.
> Correct code should `#include <functional>` to define them.
[1]: https://gcc.gnu.org/gcc-7/porting_to.html
Signed-off-by: Eddie Ringle <eddie@ringle.io>
If we don't assign the unprivileged user as owner the container
will fail to start as the Android services wont be able to write
anything into the created directory hierarchy.