aboutsummaryrefslogtreecommitdiff
path: root/examples/mqtt/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'examples/mqtt/main.go')
-rw-r--r--examples/mqtt/main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/mqtt/main.go b/examples/mqtt/main.go
index 0ad9c5f..35058d4 100644
--- a/examples/mqtt/main.go
+++ b/examples/mqtt/main.go
@@ -44,11 +44,11 @@ func channelHandler(channel string) mqtt.HandlerFunc {
var message pb.Data
err = proto.Unmarshal(decodedMessage, &message)
- log.Info(processMessage(message), "topic", m.Topic, "channel", channel, "portnum", message.Portnum.String())
+ log.Info(processMessage(&message), "topic", m.Topic, "channel", channel, "portnum", message.Portnum.String())
}
}
-func processMessage(message pb.Data) string {
+func processMessage(message *pb.Data) string {
if message.Portnum == pb.PortNum_NODEINFO_APP {
var user = pb.User{}
proto.Unmarshal(message.Payload, &user)