Revert "msgtest fd-passing"
authorStefan Metzmacher <metze@samba.org>
Fri, 5 Sep 2014 23:39:26 +0000 (01:39 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 10 Feb 2020 13:37:55 +0000 (14:37 +0100)
This reverts commit b3acb9b155309f5459cd74c884a03e8b0a9b97f5.

source3/torture/msgtest.c

index dbaf6a802370b6a237cb253545059e29619b2c96..1d2a8a9b1c86275a74d6cd11ec23cd6d6858e3a4 100644 (file)
@@ -47,8 +47,6 @@ static void pong_message(struct messaging_context *msg_ctx,
        char buf[12];
        int ret;
        TALLOC_CTX *frame = talloc_stackframe();
-       int fds[1] = { 0 };
-       NTSTATUS status;
 
        smb_init_locale();
 
@@ -76,24 +74,8 @@ static void pong_message(struct messaging_context *msg_ctx,
        messaging_register(msg_ctx, NULL, MSG_PONG, pong_message);
 
        for (i=0;i<n;i++) {
-               status = messaging_send(msg_ctx, pid_to_procid(pid), MSG_PING,
-                                       &data_blob_null);
-               if (!NT_STATUS_IS_OK(status)) {
-                       fprintf(stderr, "%s:%s: error: %s\n",
-                               __location__, __func__,
-                               nt_errstr(status));
-                       TALLOC_FREE(frame);
-                       exit(1);
-               }
-               status = messaging_send_iov(msg_ctx, pid_to_procid(pid),
-                                           MSG_PING, NULL, 0, fds, 1);
-               if (!NT_STATUS_IS_OK(status)) {
-                       fprintf(stderr, "%s:%s: error: %s\n",
-                               __location__, __func__,
-                               nt_errstr(status));
-                       TALLOC_FREE(frame);
-                       exit(1);
-               }
+               messaging_send(msg_ctx, pid_to_procid(pid), MSG_PING,
+                              &data_blob_null);
        }
 
        while (pong_count < i) {
@@ -109,24 +91,10 @@ static void pong_message(struct messaging_context *msg_ctx,
        strlcpy(buf, "1234567890", sizeof(buf));
 
        for (i=0;i<n;i++) {
-               status = messaging_send(msg_ctx, messaging_server_id(msg_ctx),
-                                       MSG_PING, &data_blob_null);
-               if (!NT_STATUS_IS_OK(status)) {
-                       fprintf(stderr, "%s:%s: error: %s\n",
-                               __location__, __func__,
-                               nt_errstr(status));
-                       TALLOC_FREE(frame);
-                       exit(1);
-               }
-               status = messaging_send_buf(msg_ctx, messaging_server_id(msg_ctx),
-                                           MSG_PING, (uint8_t *)buf, 11);
-               if (!NT_STATUS_IS_OK(status)) {
-                       fprintf(stderr, "%s:%s: error: %s\n",
-                               __location__, __func__,
-                               nt_errstr(status));
-                       TALLOC_FREE(frame);
-                       exit(1);
-               }
+               messaging_send(msg_ctx, messaging_server_id(msg_ctx), MSG_PING,
+                              &data_blob_null);
+               messaging_send_buf(msg_ctx, messaging_server_id(msg_ctx),
+                                  MSG_PING,(uint8_t *)buf, 11);
        }
 
        /*
@@ -170,10 +138,6 @@ static void pong_message(struct messaging_context *msg_ctx,
                                                   msg_ctx, pid_to_procid(pid),
                                                   MSG_PING, &data_blob_null)))
                           ping_count++;
-                       if(NT_STATUS_IS_OK(messaging_send_iov(
-                                                  msg_ctx, pid_to_procid(pid),
-                                                  MSG_PING, NULL, 0, fds, 1)))
-                          ping_count++;
 
                        while (ping_count > pong_count + 20) {
                                ret = tevent_loop_once(evt_ctx);