git.samba.org
/
jra
/
samba
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c4c5e5
)
Ensure we don't keep searching for sharename if it's
author
Jeremy Allison
<jra@samba.org>
Wed, 14 May 2008 21:10:05 +0000
(14:10 -0700)
committer
Jeremy Allison
<jra@samba.org>
Wed, 14 May 2008 21:10:05 +0000
(14:10 -0700)
not the start of the list.
Jeremy.
(This used to be commit
15857534b76bc66ad122510100aa224f17250465
)
source3/smbd/conn.c
patch
|
blob
|
history
diff --git
a/source3/smbd/conn.c
b/source3/smbd/conn.c
index 125277be21128badcac0aa348b83cf357d52808a..159b232b5faf19b230fc6e55e590635f050fff6a 100644
(file)
--- 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;