You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2017/08/24 02:30:46 UTC

[mynewt-newtmgr] branch master updated (86e0ff2 -> 89c71d4)

This is an automated email from the ASF dual-hosted git repository.

ccollins pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newtmgr.git.


    from 86e0ff2  newtmgr - revendor
     new d3011fb  nmxact - Prevent hang on listener multi-close.
     new 89c71d4  newtmgr - revendor

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 newtmgr/Godeps/Godeps.json                         | 56 +++++++++++-----------
 .../mynewt.apache.org/newtmgr/nmxact/nmble/conn.go | 11 +++--
 .../newtmgr/nmxact/nmble/listen.go                 |  5 +-
 nmxact/nmble/listen.go                             |  1 +
 4 files changed, 39 insertions(+), 34 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
['"commits@mynewt.apache.org" <co...@mynewt.apache.org>'].

[mynewt-newtmgr] 01/02: nmxact - Prevent hang on listener multi-close.

Posted by cc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ccollins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newtmgr.git

commit d3011fb4c2e029dc6d9026064ac07d5a221724e5
Author: Christopher Collins <cc...@apache.org>
AuthorDate: Wed Aug 23 19:28:47 2017 -0700

    nmxact - Prevent hang on listener multi-close.
---
 nmxact/nmble/listen.go | 1 +
 1 file changed, 1 insertion(+)

diff --git a/nmxact/nmble/listen.go b/nmxact/nmble/listen.go
index fe8ee61..e1b35b6 100644
--- a/nmxact/nmble/listen.go
+++ b/nmxact/nmble/listen.go
@@ -83,6 +83,7 @@ func (bl *Listener) Close() {
 	// time.
 	if t := bl.timer; t != nil {
 		nmxutil.StopAndDrainTimer(t)
+		bl.timer = nil
 	}
 
 	// Mark the command as acked in case the race condition mentioned above

-- 
To stop receiving notification emails like this one, please contact
"commits@mynewt.apache.org" <co...@mynewt.apache.org>.

[mynewt-newtmgr] 02/02: newtmgr - revendor

Posted by cc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ccollins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newtmgr.git

commit 89c71d46b5530341f1fefb2daf277d477bd4e610
Author: Christopher Collins <cc...@apache.org>
AuthorDate: Wed Aug 23 19:29:22 2017 -0700

    newtmgr - revendor
---
 newtmgr/Godeps/Godeps.json                         | 56 +++++++++++-----------
 .../mynewt.apache.org/newtmgr/nmxact/nmble/conn.go | 11 +++--
 .../newtmgr/nmxact/nmble/listen.go                 |  5 +-
 3 files changed, 38 insertions(+), 34 deletions(-)

diff --git a/newtmgr/Godeps/Godeps.json b/newtmgr/Godeps/Godeps.json
index b94c1f2..69a7c15 100644
--- a/newtmgr/Godeps/Godeps.json
+++ b/newtmgr/Godeps/Godeps.json
@@ -127,73 +127,73 @@
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newtmgr/nmxact/adv",
-			"Comment": "mynewt_1_1_0_tag-72-g4bab771",
-			"Rev": "4bab771175fae622e2193415cb56fd4bf8008e0f"
+			"Comment": "mynewt_1_1_0_tag-75-g5ec2cea",
+			"Rev": "5ec2ceaf4415cd3777179e2899c90f1be5bd8226"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newtmgr/nmxact/bledefs",
-			"Comment": "mynewt_1_1_0_tag-72-g4bab771",
-			"Rev": "4bab771175fae622e2193415cb56fd4bf8008e0f"
+			"Comment": "mynewt_1_1_0_tag-75-g5ec2cea",
+			"Rev": "5ec2ceaf4415cd3777179e2899c90f1be5bd8226"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newtmgr/nmxact/mgmt",
-			"Comment": "mynewt_1_1_0_tag-72-g4bab771",
-			"Rev": "4bab771175fae622e2193415cb56fd4bf8008e0f"
+			"Comment": "mynewt_1_1_0_tag-75-g5ec2cea",
+			"Rev": "5ec2ceaf4415cd3777179e2899c90f1be5bd8226"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newtmgr/nmxact/nmble",
-			"Comment": "mynewt_1_1_0_tag-72-g4bab771",
-			"Rev": "4bab771175fae622e2193415cb56fd4bf8008e0f"
+			"Comment": "mynewt_1_1_0_tag-75-g5ec2cea",
+			"Rev": "5ec2ceaf4415cd3777179e2899c90f1be5bd8226"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newtmgr/nmxact/nmp",
-			"Comment": "mynewt_1_1_0_tag-72-g4bab771",
-			"Rev": "4bab771175fae622e2193415cb56fd4bf8008e0f"
+			"Comment": "mynewt_1_1_0_tag-75-g5ec2cea",
+			"Rev": "5ec2ceaf4415cd3777179e2899c90f1be5bd8226"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newtmgr/nmxact/nmserial",
-			"Comment": "mynewt_1_1_0_tag-72-g4bab771",
-			"Rev": "4bab771175fae622e2193415cb56fd4bf8008e0f"
+			"Comment": "mynewt_1_1_0_tag-75-g5ec2cea",
+			"Rev": "5ec2ceaf4415cd3777179e2899c90f1be5bd8226"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newtmgr/nmxact/nmxutil",
-			"Comment": "mynewt_1_1_0_tag-72-g4bab771",
-			"Rev": "4bab771175fae622e2193415cb56fd4bf8008e0f"
+			"Comment": "mynewt_1_1_0_tag-75-g5ec2cea",
+			"Rev": "5ec2ceaf4415cd3777179e2899c90f1be5bd8226"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newtmgr/nmxact/oic",
-			"Comment": "mynewt_1_1_0_tag-72-g4bab771",
-			"Rev": "4bab771175fae622e2193415cb56fd4bf8008e0f"
+			"Comment": "mynewt_1_1_0_tag-75-g5ec2cea",
+			"Rev": "5ec2ceaf4415cd3777179e2899c90f1be5bd8226"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newtmgr/nmxact/omp",
-			"Comment": "mynewt_1_1_0_tag-72-g4bab771",
-			"Rev": "4bab771175fae622e2193415cb56fd4bf8008e0f"
+			"Comment": "mynewt_1_1_0_tag-75-g5ec2cea",
+			"Rev": "5ec2ceaf4415cd3777179e2899c90f1be5bd8226"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newtmgr/nmxact/scan",
-			"Comment": "mynewt_1_1_0_tag-72-g4bab771",
-			"Rev": "4bab771175fae622e2193415cb56fd4bf8008e0f"
+			"Comment": "mynewt_1_1_0_tag-75-g5ec2cea",
+			"Rev": "5ec2ceaf4415cd3777179e2899c90f1be5bd8226"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newtmgr/nmxact/sesn",
-			"Comment": "mynewt_1_1_0_tag-72-g4bab771",
-			"Rev": "4bab771175fae622e2193415cb56fd4bf8008e0f"
+			"Comment": "mynewt_1_1_0_tag-75-g5ec2cea",
+			"Rev": "5ec2ceaf4415cd3777179e2899c90f1be5bd8226"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newtmgr/nmxact/udp",
-			"Comment": "mynewt_1_1_0_tag-72-g4bab771",
-			"Rev": "4bab771175fae622e2193415cb56fd4bf8008e0f"
+			"Comment": "mynewt_1_1_0_tag-75-g5ec2cea",
+			"Rev": "5ec2ceaf4415cd3777179e2899c90f1be5bd8226"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newtmgr/nmxact/xact",
-			"Comment": "mynewt_1_1_0_tag-72-g4bab771",
-			"Rev": "4bab771175fae622e2193415cb56fd4bf8008e0f"
+			"Comment": "mynewt_1_1_0_tag-75-g5ec2cea",
+			"Rev": "5ec2ceaf4415cd3777179e2899c90f1be5bd8226"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newtmgr/nmxact/xport",
-			"Comment": "mynewt_1_1_0_tag-72-g4bab771",
-			"Rev": "4bab771175fae622e2193415cb56fd4bf8008e0f"
+			"Comment": "mynewt_1_1_0_tag-75-g5ec2cea",
+			"Rev": "5ec2ceaf4415cd3777179e2899c90f1be5bd8226"
 		}
 	]
 }
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/conn.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/conn.go
index e82b35e..f76907a 100644
--- a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/conn.go
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/conn.go
@@ -75,8 +75,9 @@ func (c *Conn) DisconnectChan() <-chan error {
 }
 
 func (c *Conn) abortNotifyListeners(err error) {
-	// No need to lock mutex; this should only be called after all go routines
-	// have terminated.
+	c.mtx.Lock()
+	defer c.mtx.Unlock()
+
 	for _, nl := range c.notifyMap {
 		nl.ErrChan <- err
 		close(nl.NotifyChan)
@@ -378,6 +379,7 @@ func (c *Conn) Connect(bx *BleXport, ownAddrType BleAddrType, peer BleDev,
 	return nil
 }
 
+// Opens the session for an already-established BLE connection.
 func (c *Conn) Inherit(connHandle uint16, bl *Listener) error {
 	if err := c.startConnecting(); err != nil {
 		return err
@@ -546,13 +548,14 @@ func (c *Conn) Profile() *Profile {
 	return &c.profile
 }
 
+// Indicates whether an error reported during MTU exchange is a "real" error or
+// not.  If the error was reported because MTU exchange already took place,
+// that isn't considered a real error.
 func isExchangeMtuError(err error) bool {
 	if err == nil {
 		return false
 	}
 
-	// If the operation failed because the peer already initiated the
-	// exchange, just pretend it was successful.
 	bhe := nmxutil.ToBleHost(err)
 	if bhe == nil {
 		return true
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/listen.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/listen.go
index 19a1f2a..e1b35b6 100644
--- a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/listen.go
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/listen.go
@@ -81,8 +81,9 @@ func (bl *Listener) AfterTimeout(tmo time.Duration) <-chan time.Time {
 func (bl *Listener) Close() {
 	// This provokes a race condition.  The timer may get initialized at any
 	// time.
-	if bl.timer != nil {
-		bl.timer.Stop()
+	if t := bl.timer; t != nil {
+		nmxutil.StopAndDrainTimer(t)
+		bl.timer = nil
 	}
 
 	// Mark the command as acked in case the race condition mentioned above

-- 
To stop receiving notification emails like this one, please contact
"commits@mynewt.apache.org" <co...@mynewt.apache.org>.