Repository: qpid-proton
Updated Branches:
  refs/heads/master 8e61c86ac -> f1b484ac6


NO-JIRA: go: simply SentStatus, use Accepted for Presettled.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/1e042090
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/1e042090
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/1e042090

Branch: refs/heads/master
Commit: 1e042090fe022c291f0c8ceb70e2ee1f018ed3d2
Parents: 8e61c86
Author: Alan Conway <[email protected]>
Authored: Thu Nov 26 10:31:43 2015 -0500
Committer: Alan Conway <[email protected]>
Committed: Thu Nov 26 17:20:48 2015 -0500

----------------------------------------------------------------------
 examples/go/electron/broker.go                              | 1 +
 .../bindings/go/src/qpid.apache.org/electron/connection.go  | 2 ++
 proton-c/bindings/go/src/qpid.apache.org/electron/sender.go | 9 ++++-----
 proton-c/bindings/go/src/qpid.apache.org/proton/wrappers.go | 5 ++---
 4 files changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/1e042090/examples/go/electron/broker.go
----------------------------------------------------------------------
diff --git a/examples/go/electron/broker.go b/examples/go/electron/broker.go
index 66941b7..9849328 100644
--- a/examples/go/electron/broker.go
+++ b/examples/go/electron/broker.go
@@ -139,6 +139,7 @@ func (c *connection) run() {
                default:
                        in.Accept() // Accept sessions unconditionally
                }
+               util.Debugf("incoming: %v", in)
        }
        util.Debugf("incoming closed: %v", c.connection)
 }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/1e042090/proton-c/bindings/go/src/qpid.apache.org/electron/connection.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/electron/connection.go 
b/proton-c/bindings/go/src/qpid.apache.org/electron/connection.go
index 8a9e6cd..386875d 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/electron/connection.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/electron/connection.go
@@ -23,6 +23,7 @@ package electron
 import "C"
 
 import (
+       "fmt"
        "net"
        "qpid.apache.org/proton"
        "sync"
@@ -219,6 +220,7 @@ func makeIncoming(e proton.Endpoint) incoming {
        return incoming{endpoint: e, acceptCh: make(chan func() error)}
 }
 
+func (in *incoming) String() string   { return fmt.Sprintf("%s: %s", 
in.endpoint.Type(), in.endpoint) }
 func (in *incoming) Reject(err error) { in.acceptCh <- func() error { return 
err } }
 
 // Call in proton goroutine, wait for and call the accept function fr

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/1e042090/proton-c/bindings/go/src/qpid.apache.org/electron/sender.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/electron/sender.go 
b/proton-c/bindings/go/src/qpid.apache.org/electron/sender.go
index 573e9da..834eb75 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/electron/sender.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/electron/sender.go
@@ -23,6 +23,7 @@ package electron
 import "C"
 
 import (
+       "fmt"
        "qpid.apache.org/amqp"
        "qpid.apache.org/proton"
        "time"
@@ -90,9 +91,7 @@ const (
        Unsent SentStatus = iota
        // Message was sent but never acknowledged. It may or may not have been 
received.
        Unacknowledged
-       // Message was sent pre-settled, no remote outcome is available.
-       Presettled
-       // Message was accepted by the receiver
+       // Message was accepted by the receiver (or was sent pre-settled, 
accept is assumed)
        Accepted
        // Message was rejected as invalid by the receiver
        Rejected
@@ -118,7 +117,7 @@ func (s SentStatus) String() string {
        case Unknown:
                return "unknown"
        default:
-               return "invalid"
+               return fmt.Sprintf("invalid(%d)", s)
        }
 }
 
@@ -163,7 +162,7 @@ func (s *sender) SendAsyncTimeout(m amqp.Message, ack 
chan<- Outcome, v interfac
                        if ack != nil { // We must report an outcome
                                if s.SndSettle() == SndSettled {
                                        delivery.Settle() // Pre-settle if 
required
-                                       ack <- Outcome{Presettled, nil, v}
+                                       ack <- Outcome{Accepted, nil, v}
                                } else {
                                        s.handler().sentMessages[delivery] = 
sentMessage{ack, v}
                                }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/1e042090/proton-c/bindings/go/src/qpid.apache.org/proton/wrappers.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/wrappers.go 
b/proton-c/bindings/go/src/qpid.apache.org/proton/wrappers.go
index a48aeab..cd547ed 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/wrappers.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/wrappers.go
@@ -261,11 +261,10 @@ func (l Link) String() string {
 
 func (l Link) Type() string {
        if l.IsSender() {
-               return "sender-link"
+               return "link(sender)"
        } else {
-               return "receiver-link"
+               return "link(receiver)"
        }
-
 }
 
 func cPtr(b []byte) *C.char {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to