From 8fec134c09589b1229c84f51fb37add1c4be35cc Mon Sep 17 00:00:00 2001
From: 554325746@qq.com <554325746@qq.com>
Date: 星期三, 13 五月 2020 17:06:56 +0800
Subject: [PATCH] fix serfSnapShot create path

---
 sync.go |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sync.go b/sync.go
index 438a3cb..3f25454 100755
--- a/sync.go
+++ b/sync.go
@@ -46,7 +46,7 @@
 	return true
 }
 
-func SyncInit(clusterID string, password string, nodeID string, strAddrs string) bool {
+func SyncInit(clusterID string, password string, nodeID string, strAddrs string, snapshotPath string) bool {
 	var ips []string
 	if strAddrs == "" {
 		ips = nil
@@ -56,7 +56,7 @@
 
 	pwdFull := syncClusterKeyPrefix + password
 
-	agent, _ = sdb.Init(clusterID, pwdFull, nodeID, ips)
+	agent, _ = sdb.Init(clusterID, pwdFull, nodeID, ips, snapshotPath)
 	if agent == nil {
 		logger.Error("sdb.Init")
 		return false
@@ -80,9 +80,9 @@
 	return true
 }
 
-func JoinCluster(clusterID, password, strAddrs, devID, devIP, devName string) bool {
+func JoinCluster(clusterID, password, strAddrs, devID, devIP, devName string, snapshotPath string) bool {
 
-	isOk := SyncInit(clusterID, password, devID, strAddrs)
+	isOk := SyncInit(clusterID, password, devID, strAddrs,snapshotPath)
 
 	if isOk { 
 		logger.Debug("dbSync.Init success")

--
Gitblit v1.8.0