Introduce non-blocking Plasma API. (#71)

* Implement new plasma client API.

* Formatting fixes.

* Make tests work again.

* Make tests run.

* Comment style.

* Fix bugs with fetch tests.

* Introduce fetch1 flag.

* Remove timer only if present.

* Formatting fixes.

* Don't access object after free.

* Formatting fixes.

* Minor change.

* refactoring plasma datastructures

* Change plasma_request and plasma_reply to use only arrays of object requests.

* some more fixes

* Remove unnecessary methods.

* Trivial.

* fixes

* use plasma_send_reply in return_from_wait1

* Lint.
This commit is contained in:
Ion
2016-12-01 02:15:21 -08:00
committed by Robert Nishihara
parent 58e8bbcb34
commit f89be9699c
16 changed files with 2053 additions and 241 deletions
+3 -3
View File
@@ -168,7 +168,7 @@ TEST request_transfer_test(void) {
read_message(read_fd, &type, &length, (uint8_t **) &req);
ASSERT(type == PLASMA_TRANSFER);
ASSERT(req->num_object_ids == 1);
ASSERT(object_ids_equal(oid, req->object_ids[0]));
ASSERT(object_ids_equal(oid, req->object_requests[0].object_id));
/* Clean up. */
utstring_free(addr);
free(req);
@@ -214,7 +214,7 @@ TEST request_transfer_retry_test(void) {
read_message(read_fd, &type, &length, (uint8_t **) &req);
ASSERT(type == PLASMA_TRANSFER);
ASSERT(req->num_object_ids == 1);
ASSERT(object_ids_equal(oid, req->object_ids[0]));
ASSERT(object_ids_equal(oid, req->object_requests[0].object_id));
/* Clean up. */
utstring_free(addr0);
utstring_free(addr1);
@@ -254,7 +254,7 @@ TEST request_transfer_timeout_test(void) {
int nbytes = recv(manager_fd, (uint8_t *) &reply, sizeof(reply), MSG_WAITALL);
ASSERT_EQ(nbytes, sizeof(reply));
ASSERT_EQ(reply.num_object_ids, 1);
ASSERT(object_ids_equal(oid, reply.object_ids[0]));
ASSERT(object_ids_equal(oid, reply.object_requests[0].object_id));
ASSERT_EQ(reply.has_object, 0);
/* Clean up. */
utstring_free(addr);