Browse Source

We don't actually read anything from workers, so don't set a callback for it

Ian Goldberg 14 years ago
parent
commit
3a420e5fcc
1 changed files with 3 additions and 9 deletions
  1. 3 9
      controller.cc

+ 3 - 9
controller.cc

@@ -376,13 +376,6 @@ static void controller_dpnode_reader(struct bufferevent *bev, void *ctx)
 
 }
 
-static void controller_worker_reader(struct bufferevent *bev, void *ctx)
-{
-    struct evbuffer *input = bufferevent_get_input(bev);
-    size_t len = evbuffer_get_length(input);
-
-}
-
 static void controller_dpnode_event_cb(struct bufferevent *bev, short events,
     void *ctx)
 {
@@ -460,9 +453,10 @@ static void controller_master_reader(struct bufferevent *bev, void *ctx)
 	case 'W':
 	    printf("Worker\n");
 	    ctrlstate.workers.idle.insert(bev);
-	    bufferevent_setcb(bev, controller_worker_reader, NULL,
+	    // We don't actually read anything from workers
+	    bufferevent_enable(bev, EV_WRITE);
+	    bufferevent_setcb(bev, NULL, NULL,
 		    controller_worker_event_cb, ctx);
-	    controller_worker_reader(bev, ctx);
 	    schedule();
 	    return;
 	default: