Skip to content

Commit

Permalink
evapi: do cfg framework update on i/o events
Browse files Browse the repository at this point in the history
(cherry picked from commit 4404f75)
  • Loading branch information
miconda committed Sep 8, 2015
1 parent 65d4dae commit fea0d08
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/evapi/evapi_dispatch.c
Expand Up @@ -36,6 +36,7 @@
#include "../../sr_module.h"
#include "../../dprint.h"
#include "../../ut.h"
#include "../../cfg/cfg_struct.h"
#include "../../lib/kcore/faked_msg.h"

#include "evapi_dispatch.h"
Expand Down Expand Up @@ -254,6 +255,8 @@ void evapi_recv_client(struct ev_loop *loop, struct ev_io *watcher, int revents)
return;
}

cfg_update();

evapi_env_reset(&evenv);
if(rlen == 0) {
/* client is gone */
Expand Down Expand Up @@ -342,6 +345,8 @@ void evapi_accept_client(struct ev_loop *loop, struct ev_io *watcher, int revent
return;
}

cfg_update();

/* accept new client connection */
csock = accept(watcher->fd, (struct sockaddr *)&caddr, &clen);

Expand Down Expand Up @@ -417,6 +422,8 @@ void evapi_recv_notify(struct ev_loop *loop, struct ev_io *watcher, int revents)
return;
}

cfg_update();

/* read message from client */
rlen = read(watcher->fd, &sbuf, sizeof(str*));

Expand Down

0 comments on commit fea0d08

Please sign in to comment.