Diff of /branches/smbnetfs-0.3/src/smbitem.c [r108] .. [r109]  Maximize  Restore

Switch to side-by-side view

--- a/branches/smbnetfs-0.3/src/smbitem.c
+++ b/branches/smbnetfs-0.3/src/smbitem.c
@@ -141,8 +141,8 @@
     if (*path == '\0') return 0;
     if (strcmp(path, ".") == 0) return 0;
     if (strcmp(path, "..") == 0) return 0;
-    if (flag & AUTOPATH) list = &auto_tree;
-    if (flag & USERPATH) list = &user_tree;
+    if (flag & SAMBA_TREE) list = &auto_tree;
+    if (flag & USER_TREE) list = &user_tree;
     if (list == NULL) return 0;
 
     make_casehstring(&name, path, filename_len(path));
@@ -164,8 +164,8 @@
     if (*path == '\0') return 0;
     if (strcmp(path, ".") == 0) return 0;
     if (strcmp(path, "..") == 0) return 0;
-    if (flag & AUTOPATH) list = &auto_tree;
-    if (flag & USERPATH) list = &user_tree;
+    if (flag & SAMBA_TREE) list = &auto_tree;
+    if (flag & USER_TREE) list = &user_tree;
     if (list == NULL) return 0;    
 
     make_casehstring(&name, path, filename_len(path));
@@ -192,8 +192,8 @@
     if (*linkname == '\0') return 0;
     if (strcmp(linkname, ".") == 0) return 0;
     if (strcmp(linkname, "..") == 0) return 0;
-    if (flag & AUTOPATH) list = &auto_tree;
-    if (flag & USERPATH) list = &user_tree;
+    if (flag & SAMBA_TREE) list = &auto_tree;
+    if (flag & USER_TREE) list = &user_tree;
     if (list == NULL) return 0;    
 
     make_casehstring(&name, path, filename_len(path));
@@ -227,8 +227,8 @@
 
 void DeleteOldSmbItem(time_t threshold, int flag){
     pthread_mutex_lock(&m_smbitem);
-    if (flag & AUTOPATH) delete_old_item(&auto_tree, threshold);
-    if (flag & USERPATH) delete_old_item(&user_tree, threshold);
+    if (flag & SAMBA_TREE) delete_old_item(&auto_tree, threshold);
+    if (flag & USER_TREE) delete_old_item(&user_tree, threshold);
     pthread_mutex_unlock(&m_smbitem);
 }
 
@@ -315,10 +315,10 @@
     make_casehstring(&name, path, filename_len(path));
     
     pthread_mutex_lock(&m_smbitem);
-    if (flag & AUTOPATH){
+    if (flag & SAMBA_TREE){
 	add_list_to_splice(finddir(&auto_tree, &name), splice);
     }	
-    if (flag & USERPATH){
+    if (flag & USER_TREE){
 	add_list_to_splice(finddir(&user_tree, &name), splice);
     }
     pthread_mutex_unlock(&m_smbitem);
@@ -355,10 +355,10 @@
     make_casehstring(&name, path, filename_len(path));
 
     pthread_mutex_lock(&m_smbitem);
-    tree = USERPATH;
+    tree = USER_TREE;
     item = FindSmbItem(&user_tree, &name);
     if (item == NULL){
-	tree = AUTOPATH;
+	tree = SAMBA_TREE;
 	item = FindSmbItem(&auto_tree, &name);
     }
     if (item != NULL) RequestElem(item);
@@ -396,7 +396,7 @@
 	pthread_mutex_lock(&m_smbitem);
 	item1 = FindSmbItem((LIST*)item->data, &name1);
 	ReleaseElem(item);
-	if ((item1 == NULL) && (tree != AUTOPATH)){
+	if ((item1 == NULL) && (tree != SAMBA_TREE)){
 	    item = FindSmbItem(&auto_tree, &name);
 	    if ((item != NULL) && (item->type == SMBITEM_GROUP))
 		item1 = FindSmbItem((LIST*)item->data, &name1);