Patch: Better integration with GAMIN.
Ira Cooper
samba at ira.wakeful.net
Mon Apr 12 10:47:43 MDT 2010
This is a minor change to make GAMIN more efficient when used with samba.
I couldn't find another #define to use other than the header guard. I
consider it ugly, but I couldn't find another way to conditionalize
code.
If you have questions, please feel free to ask.
Thanks,
-Ira
commit 99bf219b06806299d3cbac001027c4cb12a2f727
Author: Ira Cooper <samba at ira.wakeful.net>
Date: Mon Apr 12 10:41:59 2010 -0400
Rework the way we support GAMIN to be community acceptable.
diff --git a/source3/modules/vfs_notify_fam.c b/source3/modules/vfs_notify_fam.c
index 8f00c92..87d4828 100644
--- a/source3/modules/vfs_notify_fam.c
+++ b/source3/modules/vfs_notify_fam.c
@@ -79,12 +79,27 @@ static NTSTATUS fam_open_connection(FAMConnection *fam_conn,
ZERO_STRUCTP(fam_conn);
FAMCONNECTION_GETFD(fam_conn) = -1;
+
+#ifdef __GAMIN_FAM_H__
+ /* We should honor outside setting of the GAM_CLIENT_ID. */
+ setenv("GAM_CLIENT_ID","SAMBA",0);
+#endif
+
if (asprintf(&name, "smbd (%lu)", (unsigned long)sys_getpid()) == -1) {
DEBUG(0, ("No memory\n"));
return NT_STATUS_NO_MEMORY;
}
res = FAMOpen2(fam_conn, name);
+
+#ifdef __GAMIN_FAM_H__
+ /*
+ * This reduces the chatter between GAMIN and samba making the pair
+ * much more reliable.
+ */
+ FAMNoExists(fam_conn);
+#endif
+
SAFE_FREE(name);
if (res < 0) {
More information about the samba-technical
mailing list