s3:ctdb: pass the ctdb control flags to the ctdb daemon when sending the control
[metze/samba/wip.git] / source3 / lib / ctdbd_conn.c
index 3983b3db1ca405dae29b9934220cddab68903bcb..45e992ce8b3a81cf9f95ff118f11a6590f46deb8 100644 (file)
@@ -626,13 +626,6 @@ static NTSTATUS ctdb_handle_message(uint8_t *buf, size_t length,
                messaging_send(conn->msg_ctx, procid_self(),
                               MSG_SMB_BRL_VALIDATE, &data_blob_null);
 
-               /*
-                * it's possible that we have just rejoined the cluster after
-                * an outage. In that case our pending locks could have been
-                * removed from the lockdb, so retry them once more
-                */
-               message_send_all(conn->msg_ctx, MSG_SMB_UNLOCK, NULL, 0, NULL);
-
                messaging_send(conn->msg_ctx, procid_self(),
                               MSG_DBWRAP_G_LOCK_RETRY,
                               &data_blob_null);
@@ -799,9 +792,6 @@ static NTSTATUS ctdbd_control(struct ctdbd_connection *conn,
        struct ctdbd_connection *new_conn = NULL;
        NTSTATUS status;
 
-       /* the samba3 ctdb code can't handle NOREPLY yet */
-       flags &= ~CTDB_CTRL_FLAG_NOREPLY;
-
        if (conn == NULL) {
                status = ctdbd_init_connection(NULL, &new_conn);
 
@@ -824,6 +814,7 @@ static NTSTATUS ctdbd_control(struct ctdbd_connection *conn,
        req.opcode           = opcode;
        req.srvid            = srvid;
        req.datalen          = data.dsize;
+       req.flags            = flags;
 
        DEBUG(10, ("ctdbd_control: Sending ctdb packet\n"));
        ctdb_packet_dump(&req.hdr);
@@ -847,6 +838,9 @@ static NTSTATUS ctdbd_control(struct ctdbd_connection *conn,
 
        if (flags & CTDB_CTRL_FLAG_NOREPLY) {
                TALLOC_FREE(new_conn);
+               if (cstatus) {
+                       *cstatus = 0;
+               }
                return NT_STATUS_OK;
        }