[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-2432-g1585753

Jeremy Allison jra at samba.org
Wed May 14 21:10:28 GMT 2008


The branch, v3-3-test has been updated
       via  15857534b76bc66ad122510100aa224f17250465 (commit)
      from  9a40cbd66f71c49af4c72ed826d66c5f037a3171 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test


- Log -----------------------------------------------------------------
commit 15857534b76bc66ad122510100aa224f17250465
Author: Jeremy Allison <jra at samba.org>
Date:   Wed May 14 14:10:05 2008 -0700

    Ensure we don't keep searching for sharename if it's
    not the start of the list.
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 source/smbd/conn.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/smbd/conn.c b/source/smbd/conn.c
index 125277b..159b232 100644
--- a/source/smbd/conn.c
+++ b/source/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;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list