diff options
author | Jeremy Allison <jra@samba.org> | 2008-05-14 14:10:05 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2008-05-14 14:10:05 -0700 |
commit | 96ef630ba33f23125b2d7c6c2fa74b524f285c1e (patch) | |
tree | 7312ab8db8311097e19b241fab5b1418e3162cff | |
parent | 7c4c5e5f844b9c50e8f69c22ad541981fb1b741f (diff) | |
download | samba-96ef630ba33f23125b2d7c6c2fa74b524f285c1e.tar.gz samba-96ef630ba33f23125b2d7c6c2fa74b524f285c1e.tar.bz2 samba-96ef630ba33f23125b2d7c6c2fa74b524f285c1e.zip |
Ensure we don't keep searching for sharename if it's
not the start of the list.
Jeremy.
(This used to be commit 15857534b76bc66ad122510100aa224f17250465)
-rw-r--r-- | source3/smbd/conn.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/smbd/conn.c b/source3/smbd/conn.c index 125277be21..159b232b5f 100644 --- a/source3/smbd/conn.c +++ b/source3/smbd/conn.c @@ -90,12 +90,12 @@ connection_struct *conn_find(unsigned cnum) connection_struct *conn_find_byname(const char *service) { - int count=0; connection_struct *conn; - for (conn=Connections;conn;conn=conn->next,count++) { + for (conn=Connections;conn;conn=conn->next) { if (strequal(lp_servicename(SNUM(conn)),service)) { - if (count > 10) { + if (conn != Connections) { + /* Promote if not first. */ DLIST_PROMOTE(Connections, conn); } return conn; |