Upgrade to ooni/probe-engine@v0.1.1 (#60)
This commit is contained in:
parent
23c8df1f0c
commit
f3865d2ec0
8 changed files with 103 additions and 35 deletions
|
|
@ -11,8 +11,8 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/ooni/probe-engine/model"
|
||||
"github.com/ooni/probe-cli/utils"
|
||||
"github.com/ooni/probe-cli/internal/enginex"
|
||||
"github.com/ooni/probe-cli/internal/util"
|
||||
"github.com/pkg/errors"
|
||||
db "upper.io/db.v3"
|
||||
|
|
@ -256,14 +256,14 @@ func CreateResult(sess sqlbuilder.Database, homePath string, testGroupName strin
|
|||
}
|
||||
|
||||
// CreateNetwork will create a new network in the network table
|
||||
func CreateNetwork(sess sqlbuilder.Database, location *model.LocationInfo) (*Network, error) {
|
||||
func CreateNetwork(sess sqlbuilder.Database, loc enginex.LocationProvider) (*Network, error) {
|
||||
network := Network{
|
||||
ASN: location.ASN,
|
||||
CountryCode: location.CountryCode,
|
||||
NetworkName: location.NetworkName,
|
||||
ASN: loc.ProbeASN(),
|
||||
CountryCode: loc.ProbeCC(),
|
||||
NetworkName: loc.ProbeNetworkName(),
|
||||
// On desktop we consider it to always be wifi
|
||||
NetworkType: "wifi",
|
||||
IP: location.ProbeIP,
|
||||
IP: loc.ProbeIP(),
|
||||
}
|
||||
newID, err := sess.Collection("networks").Insert(network)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue