Skip to content

Commit

Permalink
Getting write buffer acqusition working
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Jul 24, 2015
1 parent 948356a commit 17b18d6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
13 changes: 11 additions & 2 deletions tools/camio_perf/camio_perf_client.c
Expand Up @@ -77,6 +77,8 @@ static camio_error_t connect_delim(ch_cstr client_channel_uri, camio_controller_

static camio_error_t send_message(camio_muxable_t* muxable)
{
DBG("#### Trying to send message!\n");

camio_error_t err = CAMIO_ENOERROR;
DBG("Current req_buffer=%p\n", wreq.buffer);
if(!wreq.buffer){
Expand Down Expand Up @@ -167,12 +169,19 @@ static camio_error_t on_new_connect(camio_muxable_t* muxable)

camio_mux_insert(mux,&res->channel->rd_muxable,CONNECTOR_ID + 1);
camio_mux_insert(mux,&res->channel->wr_muxable,CONNECTOR_ID + 3);
camio_mux_insert(mux,&res->channel->wr_buff_muxable,CONNECTOR_ID + 5);

//We have a successful connection, what about another one?
camio_ctrl_chan_req(controller, &chan_req, 1);

//Kick things off by sending the first message
send_message(&res->channel->wr_muxable);

//We have a successful connection, what about another one?
err = camio_ctrl_chan_req(controller, &chan_req, 1);
if(err ){
DBG("Unexpected error making controller request\n");
return err;
}

return CAMIO_ENOERROR;

}
Expand Down
1 change: 1 addition & 0 deletions tools/camio_perf/camio_perf_server.c
Expand Up @@ -99,6 +99,7 @@ static camio_error_t on_new_connect(camio_muxable_t* muxable)

camio_mux_insert(mux,&res->channel->rd_muxable,CONNECTOR_ID + 1);
camio_mux_insert(mux,&res->channel->wr_muxable,CONNECTOR_ID + 3);
camio_mux_insert(mux,&res->channel->wr_buff_muxable,CONNECTOR_ID + 5);

//Kick things off by asking for data
rreq.dst_offset_hint = CAMIO_READ_REQ_DST_OFFSET_NONE;
Expand Down

0 comments on commit 17b18d6

Please sign in to comment.