const char *db_name = (const char *)indata.dptr;
struct ctdb_db_context *db;
struct ctdb_node *node = ctdb->nodes[ctdb->pnn];
+ struct ctdb_client *client = NULL;
/* dont allow any local clients to attach while we are in recovery mode
* except for the recovery daemon.
* recovery daemons.
*/
if (client_id != 0) {
- struct ctdb_client *client = ctdb_reqid_find(ctdb, client_id, struct ctdb_client);
-
- if (client == NULL) {
- DEBUG(DEBUG_ERR,("DB Attach to database %s refused. Can not match clientid:%d to a client structure.\n", db_name, client_id));
- return -1;
- }
-
+ client = ctdb_reqid_find(ctdb, client_id, struct ctdb_client);
+ }
+ if (client != NULL) {
/* If the node is inactive it is not part of the cluster
and we should not allow clients to attach to any
databases