- struct ctdb_node *node;
-
- /* dont allow any local clients to attach while we are in recovery mode
- * except for the recovery daemon.
- * allow all attach from the network since these are always from remote
- * recovery daemons.
- */
- if (ctdb->recovery_mode == CTDB_RECOVERY_ACTIVE && client_id != 0) {
- struct ctdb_client *client = ctdb_reqid_find(ctdb, client_id, struct ctdb_client);
-
- if (client != NULL && client->pid != ctdb->recoverd_pid) {
- DEBUG(DEBUG_ERR,("DB Attach to database %s refused for client with pid:%d since node is in recovery mode.\n", db_name, client->pid));
- return -1;
- }
- }
-
- node = ctdb->nodes[ctdb->pnn];