diff options
author | Jeremy Allison <jra@samba.org> | 2001-07-17 22:04:46 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-07-17 22:04:46 +0000 |
commit | 0b13f495b31887d526b46a48a812fa3fd418ce8e (patch) | |
tree | 37dd377989c10e825ab6f0dca311199be445b4ff | |
parent | d7da59f54eed69d50490205d6233bf4801c16998 (diff) | |
download | samba-0b13f495b31887d526b46a48a812fa3fd418ce8e.tar.gz samba-0b13f495b31887d526b46a48a812fa3fd418ce8e.tar.xz samba-0b13f495b31887d526b46a48a812fa3fd418ce8e.zip |
Tidied up calling yield_connection on connection allocation fail.
Restore debug message to level zero.
Jeremy.
-rw-r--r-- | source/smbd/connection.c | 3 | ||||
-rw-r--r-- | source/smbd/service.c | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/source/smbd/connection.c b/source/smbd/connection.c index eeec4a2ca21..07ded5f4a36 100644 --- a/source/smbd/connection.c +++ b/source/smbd/connection.c @@ -58,7 +58,8 @@ BOOL yield_connection(connection_struct *conn,char *name,int max_connections) kbuf.dsize = sizeof(key); if (tdb_delete(tdb, kbuf) != 0) { - DEBUG(3,("yield_connection: tdb_delete failed with error %s.\n", tdb_errorstr(tdb) )); + DEBUG(0,("yield_connection: tdb_delete for name %s failed with error %s.\n", + name, tdb_errorstr(tdb) )); return (False); } diff --git a/source/smbd/service.c b/source/smbd/service.c index 04139be917b..2152a3e4df7 100644 --- a/source/smbd/service.c +++ b/source/smbd/service.c @@ -512,6 +512,7 @@ connection_struct *make_connection(char *service,char *user,char *password, int *ecode = ERRaccess; DEBUG(0,( "make_connection: connection to %s denied due to security descriptor.\n", service )); + yield_connection(conn, lp_servicename(SNUM(conn)), lp_max_connections(SNUM(conn))); conn_free(conn); return NULL; } else { @@ -523,6 +524,7 @@ connection_struct *make_connection(char *service,char *user,char *password, int if (!vfs_init(conn)) { DEBUG(0, ("vfs_init failed for service %s\n", lp_servicename(SNUM(conn)))); + yield_connection(conn, lp_servicename(SNUM(conn)), lp_max_connections(SNUM(conn))); conn_free(conn); return NULL; } @@ -536,6 +538,7 @@ connection_struct *make_connection(char *service,char *user,char *password, int ret = smbrun(cmd,NULL); if (ret != 0 && lp_rootpreexec_close(SNUM(conn))) { DEBUG(1,("preexec gave %d - failing connection\n", ret)); + yield_connection(conn, lp_servicename(SNUM(conn)), lp_max_connections(SNUM(conn))); conn_free(conn); *ecode = ERRsrverror; return NULL; @@ -588,6 +591,7 @@ connection_struct *make_connection(char *service,char *user,char *password, int ret = smbrun(cmd,NULL); if (ret != 0 && lp_preexec_close(SNUM(conn))) { DEBUG(1,("preexec gave %d - failing connection\n", ret)); + yield_connection(conn, lp_servicename(SNUM(conn)), lp_max_connections(SNUM(conn))); conn_free(conn); *ecode = ERRsrverror; return NULL; |