Remove some transitional code in writev_send
authorVolker Lendecke <vl@samba.org>
Tue, 17 Mar 2009 08:38:14 +0000 (09:38 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 17 Mar 2009 16:31:22 +0000 (17:31 +0100)
lib/async_req/async_sock.c

index be24bae6dfd5b27ea9dc8c2b3aca7e39530b3192..77df4060449f939fedbc709946cbfb491c89d4d1 100644 (file)
@@ -389,7 +389,6 @@ struct tevent_req *writev_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
 {
        struct tevent_req *result;
        struct writev_state *state;
-       struct tevent_fd *fde;
 
        result = tevent_req_create(mem_ctx, &state, struct writev_state);
        if (result == NULL) {
@@ -405,22 +404,7 @@ struct tevent_req *writev_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
                goto fail;
        }
 
-       /*
-        * This if () should go away once our callers are converted to always
-        * pass in a queue.
-        */
-
-       if (queue != NULL) {
-               if (!tevent_queue_add(queue, ev, result, writev_trigger,
-                                     NULL)) {
-                       goto fail;
-               }
-               return result;
-       }
-
-       fde = tevent_add_fd(ev, state, fd, TEVENT_FD_WRITE, writev_handler,
-                           result);
-       if (fde == NULL) {
+       if (!tevent_queue_add(queue, ev, result, writev_trigger, NULL)) {
                goto fail;
        }
        return result;