Skip to content

Commit

Permalink
Update github.com/eclipse/paho.mqtt.golang vendor.
Browse files Browse the repository at this point in the history
  • Loading branch information
brocaar committed Apr 4, 2016
1 parent 469515e commit 295a97c
Show file tree
Hide file tree
Showing 42 changed files with 100 additions and 120 deletions.
6 changes: 3 additions & 3 deletions backend/mqttpubsub/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import (
"encoding/gob"
"fmt"

"git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git"
log "github.com/Sirupsen/logrus"
"github.com/brocaar/loraserver"
"github.com/brocaar/lorawan"
"github.com/eclipse/paho.mqtt.golang"
)

// Backend implements a MQTT pub-sub backend.
type Backend struct {
conn *mqtt.Client
conn mqtt.Client
txPacketChan chan loraserver.TXPacket
}

Expand Down Expand Up @@ -97,7 +97,7 @@ func (b *Backend) publish(topic string, v interface{}) error {
return nil
}

func (b *Backend) txPacketHandler(c *mqtt.Client, msg mqtt.Message) {
func (b *Backend) txPacketHandler(c mqtt.Client, msg mqtt.Message) {
var txPacket loraserver.TXPacket
dec := gob.NewDecoder(bytes.NewReader(msg.Payload()))
if err := dec.Decode(&txPacket); err != nil {
Expand Down
5 changes: 2 additions & 3 deletions backend/mqttpubsub/backend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ import (
"encoding/gob"
"testing"

"git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git"

"github.com/brocaar/loraserver"
"github.com/eclipse/paho.mqtt.golang"
. "github.com/smartystreets/goconvey/convey"
)

Expand All @@ -29,7 +28,7 @@ func TestBackend(t *testing.T) {

Convey("Given the MQTT client is subscribed to RX packets", func() {
rxPacketChan := make(chan loraserver.RXPacket)
token := c.Subscribe("gateway/+/rx", 0, func(c *mqtt.Client, msg mqtt.Message) {
token := c.Subscribe("gateway/+/rx", 0, func(c mqtt.Client, msg mqtt.Message) {
var rxPacket loraserver.RXPacket
dec := gob.NewDecoder(bytes.NewReader(msg.Payload()))
if err := dec.Decode(&rxPacket); err != nil {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 295a97c

Please sign in to comment.