Browse Source

resolve merge conflicts

Abhishek Kondur 2 years ago
parent
commit
2ea7f077f7
3 changed files with 4 additions and 4 deletions
  1. 2 2
      mq/dynsec_helper.go
  2. 1 1
      mq/handlers.go
  3. 1 1
      mq/mq.go

+ 2 - 2
mq/dynsec_helper.go

@@ -186,7 +186,7 @@ func fetchHostAcls(hostID string) []Acl {
 		},
 		{
 			AclType:  "publishClientSend",
-			Topic:    fmt.Sprintf("host/update/%s", hostID),
+			Topic:    fmt.Sprintf("host/serverupdate/%s", hostID),
 			Priority: -1,
 			Allow:    true,
 		},
@@ -373,7 +373,7 @@ func fetchServerAcls() []Acl {
 		},
 		{
 			AclType:  "publishClientReceive",
-			Topic:    "host/update/#",
+			Topic:    "host/serverupdate/#",
 			Priority: -1,
 			Allow:    true,
 		},

+ 1 - 1
mq/handlers.go

@@ -141,7 +141,7 @@ func UpdateHost(client mqtt.Client, msg mqtt.Message) {
 			logger.Log(1, "error unmarshaling payload ", err.Error())
 			return
 		}
-		logger.Log(0, fmt.Sprintf("recieved host update: %+v\n", hostUpdate))
+		logger.Log(0, "recieved host update for host: ", id)
 		var sendPeerUpdate bool
 		switch hostUpdate.Action {
 		case models.UpdateHost:

+ 1 - 1
mq/mq.go

@@ -83,7 +83,7 @@ func SetupMQTT() {
 			client.Disconnect(240)
 			logger.Log(0, "node update subscription failed")
 		}
-		if token := client.Subscribe("host/update/#", 0, mqtt.MessageHandler(UpdateHost)); token.WaitTimeout(MQ_TIMEOUT*time.Second) && token.Error() != nil {
+		if token := client.Subscribe("host/serverupdate/#", 0, mqtt.MessageHandler(UpdateHost)); token.WaitTimeout(MQ_TIMEOUT*time.Second) && token.Error() != nil {
 			client.Disconnect(240)
 			logger.Log(0, "host update subscription failed")
 		}