Skip to content

Commit

Permalink
evapi: reset possition in received buffer if all data was processed
Browse files Browse the repository at this point in the history
- if there was some residual data from previous read, once reading again
  ends up in processing all netstring frames, then reset position in
  order to start from beginning with next packet
- credits to Jayesh Nambiar assisting with troubleshooting
  • Loading branch information
miconda committed Sep 29, 2015
1 parent f399292 commit 02fde16
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/evapi/evapi_dispatch.c
Expand Up @@ -371,6 +371,7 @@ void evapi_recv_client(struct ev_loop *loop, struct ev_io *watcher, int revents)
evapi_run_cfg_route(&evenv, _evapi_rts.msg_received);
k++;
}
_evapi_clients[i].rpos = 0 ;
} else {
evenv.msg.s = _evapi_clients[i].rbuffer;
evenv.msg.len = rlen;
Expand Down

0 comments on commit 02fde16

Please sign in to comment.