odissey: update machinarium; switch to new api

This commit is contained in:
Dmitry Simonenko 2017-03-31 17:17:17 +03:00
parent 8329f07c97
commit 9e97ebfe46
4 changed files with 10 additions and 7 deletions

View File

@ -32,6 +32,13 @@ set(od_libraries ${od_libraries} ${MACHINARIUM_LIBRARIES})
set(od_libraries ${od_libraries} ${MACHINARIUM_LIBRARIES_LIBUV})
include_directories(${MACHINARIUM_INCLUDE_DIRS})
# openssl
find_package(OpenSSL)
if (NOT OPENSSL_FOUND)
endif()
set(od_libraries ${od_libraries} ${OPENSSL_LIBRARIES})
include_directories("${OPENSSL_INCLUDE_DIR}")
# soprano
include(BuildSoprano)
build_soprano()

View File

@ -93,11 +93,9 @@ od_festartup_read(od_client_t *client)
int rc = so_stream_ensure(stream, to_read);
if (rc == -1)
return -1;
rc = machine_read(client->io, to_read, 0);
rc = machine_read(client->io, (char*)stream->p, to_read, 0);
if (rc < 0)
return -1;
char *data_pointer = machine_read_buf(client->io);
memcpy(stream->p, data_pointer, to_read);
so_stream_advance(stream, to_read);
}
return 0;

View File

@ -39,11 +39,9 @@ int od_read(machine_io_t io, so_stream_t *stream, int time_ms)
int rc = so_stream_ensure(stream, to_read);
if (rc == -1)
return -1;
rc = machine_read(io, to_read, time_ms);
rc = machine_read(io, (char*)stream->p, to_read, time_ms);
if (rc < 0)
return -1;
char *data_pointer = machine_read_buf(io);
memcpy(stream->p, data_pointer, to_read);
so_stream_advance(stream, to_read);
}
return 0;

@ -1 +1 @@
Subproject commit b0f195b9b42d982abbb5a203e69b0ae5a94eb52d
Subproject commit 3e091b6c76ee765f459dff346d612de97d278897