Skip to content

Commit

Permalink
More fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertnishihara committed Oct 29, 2016
1 parent f748ba2 commit 4db94cc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
5 changes: 2 additions & 3 deletions src/plasma/plasma_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,8 @@ int send_client_reply(client_connection *conn, plasma_reply *reply) {
}

int send_client_failure_reply(object_id object_id, client_connection *conn) {
plasma_reply reply = {.object_ids = {object_id},
.num_object_ids = 1,
.has_object = 0};
plasma_reply reply = {
.object_ids = {object_id}, .num_object_ids = 1, .has_object = 0};
return send_client_reply(conn, &reply);
}

Expand Down
18 changes: 11 additions & 7 deletions src/plasma/plasma_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,15 @@ void process_fetch_requests(client_connection *client_conn,

/**
* Process a wait request from a client.
* @return client_conn The connection context for the client that made the
* request.
*
* @param client_conn The connection context for the client that made the
* request.
* @param num_object_ids Number of object IDs wait is called on.
* @param object_ids Object IDs wait is called on.
* @param timeout Wait will time out and return after this number of ms.
* @param timeout Wait will time out and return after this number of
* milliseconds.
* @param num_returns Number of object IDs wait will return if it doesn't time
* out.
* out.
* @return Void.
*/
void process_wait_request(client_connection *client_conn,
Expand All @@ -169,6 +171,7 @@ void process_wait_request(client_connection *client_conn,
* @param client_sock The connection to the plasma store.
* @param context Plasma manager state.
* @param events (unused).
* @return Void.
*/
void process_object_notification(event_loop *loop,
int client_sock,
Expand Down Expand Up @@ -267,6 +270,7 @@ void request_transfer(object_id object_id,
*
* @param client_conn The client connection context.
* @param object_id The object ID whose context we want to delete.
* @return Void.
*/
void remove_object_connection(client_connection *client_conn,
client_object_connection *object_conn);
Expand All @@ -290,9 +294,9 @@ client_connection *get_manager_connection(plasma_manager_state *state,
*
* @param conn The connection to the client who's sending the data.
* @param buf The buffer to write the data into.
* @return An integer representing whether the client is done
* sending this object. 1 means that the client has
* sent all the data, 0 means there is more.
* @return An integer representing whether the client is done sending this
* object. 1 means that the client has sent all the data, 0 means there
* is more.
*/
int read_object_chunk(client_connection *conn, plasma_request_buffer *buf);

Expand Down
4 changes: 2 additions & 2 deletions src/plasma/test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def tearDown(self):
# memory_buffer=memory_buffer1, metadata=metadata1)
# assert_get_object_equal(self, self.client2, self.client1, object_id2,
# memory_buffer=memory_buffer2, metadata=metadata2)

def test_wait(self):
# Test timeout.
obj_id0 = random_object_id()
Expand All @@ -366,7 +366,7 @@ def test_wait(self):
self.assertEqual(ready[0], obj_id1)
self.assertEqual(len(waiting), 1)
self.assertEqual(waiting[0], obj_id2)

# Test wait if object is sealed later.
obj_id3 = random_object_id()

Expand Down

0 comments on commit 4db94cc

Please sign in to comment.