qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject [50/50] [abbrv] qpid-proton git commit: Fixup merge from master
Date Fri, 14 Nov 2014 11:03:59 GMT
Fixup merge from master


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

Branch: refs/heads/examples
Commit: 51a757bc432854e5b73a11c6af109654f3eb7e6f
Parents: 9050976
Author: Gordon Sim <gsim@redhat.com>
Authored: Fri Nov 14 10:51:12 2014 +0000
Committer: Gordon Sim <gsim@redhat.com>
Committed: Fri Nov 14 11:03:27 2014 +0000

----------------------------------------------------------------------
 proton-c/bindings/python/proton.py | 110 --------------------------------
 proton-c/src/transport/transport.c |  21 ------
 proton-c/src/windows/schannel.c    |  10 ---
 3 files changed, 141 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/51a757bc/proton-c/bindings/python/proton.py
----------------------------------------------------------------------
diff --git a/proton-c/bindings/python/proton.py b/proton-c/bindings/python/proton.py
index f9f10f7..7d98929 100644
--- a/proton-c/bindings/python/proton.py
+++ b/proton-c/bindings/python/proton.py
@@ -2222,9 +2222,6 @@ class Condition:
                                         (self.name, self.description, self.info)
                                         if x])
 
-  def __str__(self):
-    return ": ".join(filter(None, [self.name, self.description, self.info]))
-
   def __eq__(self, o):
     if not isinstance(o, Condition): return False
     return self.name == o.name and \
@@ -3876,110 +3873,3 @@ __all__ = [
            "timestamp",
            "ulong"
            ]
-
-
-class Url(object):
-  """
-  Simple URL parser/constructor, handles URLs of the form:
-
-    <scheme>://<user>:<password>@<host>:<port>/<path>
-
-  All components can be None if not specifeid in the URL string.
-
-  The port can be specified as a service name, e.g. 'amqp' in the
-  URL string but Url.port always gives the integer value.
-
-  @ivar scheme: Url scheme e.g. 'amqp' or 'amqps'
-  @ivar user: Username
-  @ivar password: Password
-  @ivar host: Host name, ipv6 literal or ipv4 dotted quad.
-  @ivar port: Integer port.
-  @ivar host_port: Returns host:port
-  """
-
-  AMQPS = "amqps"
-  AMQP = "amqp"
-
-  class Port(int):
-    """An integer port number that can be constructed from a service name string"""
-
-    def __new__(cls, value):
-      """@param value: integer port number or string service name."""
-      port = super(Url.Port, cls).__new__(cls, cls._port_int(value))
-      setattr(port, 'name', str(value))
-      return port
-
-    def __eq__(self, x): return str(self) == x or int(self) == x
-    def __ne__(self, x): return not self == x
-    def __str__(self): return str(self.name)
-
-    @staticmethod
-    def _port_int(value):
-      """Convert service, an integer or a service name, into an integer port number."""
-      try:
-        return int(value)
-      except ValueError:
-        try:
-          return socket.getservbyname(value)
-        except socket.error:
-          # Not every system has amqp/amqps defined as a service
-          if value == Url.AMQPS:  return 5671
-          elif value == Url.AMQP: return 5672
-          else:
-            raise ValueError("Not a valid port number or service name: '%s'" % value)
-
-  def __init__(self, url=None, **kwargs):
-    """
-    @param url: URL string to parse.
-    @param kwargs: scheme, user, password, host, port, path.
-      If specified, replaces corresponding part in url string.
-    """
-    if url:
-      self._url = pn_url_parse(str(url))
-      if not self._url: raise ValueError("Invalid URL '%s'" % url)
-    else:
-      self._url = pn_url()
-    for k in kwargs:            # Let kwargs override values parsed from url
-      getattr(self, k)          # Check for invalid kwargs
-      setattr(self, k, kwargs[k])
-
-  class PartDescriptor(object):
-    def __init__(self, part):
-      self.getter = globals()["pn_url_get_%s" % part]
-      self.setter = globals()["pn_url_set_%s" % part]
-    def __get__(self, obj, type=None): return self.getter(obj._url)
-    def __set__(self, obj, value): return self.setter(obj._url, str(value))
-
-  scheme = PartDescriptor('scheme')
-  username = PartDescriptor('username')
-  password = PartDescriptor('password')
-  host = PartDescriptor('host')
-  path = PartDescriptor('path')
-
-  def _get_port(self):
-    portstr = pn_url_get_port(self._url)
-    return portstr and Url.Port(portstr)
-
-  def _set_port(self, value):
-    if value is None: pn_url_set_port(self._url, None)
-    else: pn_url_set_port(self._url, str(Url.Port(value)))
-
-  port = property(_get_port, _set_port)
-
-  def __str__(self): return pn_url_str(self._url)
-
-  def __repr__(self): return "Url(%r)" % str(self)
-
-  def __del__(self):
-    pn_url_free(self._url);
-    self._url = None
-
-  def defaults(self):
-    """
-    Fill in missing values (scheme, host or port) with defaults
-    @return: self
-    """
-    self.scheme = self.scheme or self.AMQP
-    self.host = self.host or '0.0.0.0'
-    self.port = self.port or self.Port(self.scheme)
-    return self

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/51a757bc/proton-c/src/transport/transport.c
----------------------------------------------------------------------
diff --git a/proton-c/src/transport/transport.c b/proton-c/src/transport/transport.c
index d9dfab8..a118ea6 100644
--- a/proton-c/src/transport/transport.c
+++ b/proton-c/src/transport/transport.c
@@ -1076,14 +1076,6 @@ ssize_t pn_transport_input(pn_transport_t *transport, const char *bytes,
size_t
   return original - available;
 }
 
-static void pni_maybe_post_closed(pn_transport_t *transport)
-{
-  pn_collector_t *collector = pni_transport_collector(transport);
-  if (transport->posted_head_closed && transport->posted_tail_closed) {
-    pn_collector_put(collector, PN_OBJECT, transport, PN_TRANSPORT_CLOSED);
-  }
-}
-
 // process pending input until none remaining or EOS
 static ssize_t transport_consume(pn_transport_t *transport)
 {
@@ -1105,12 +1097,6 @@ static ssize_t transport_consume(pn_transport_t *transport)
       if (transport->disp->trace & (PN_TRACE_RAW | PN_TRACE_FRM))
         pn_transport_log(transport, "  <- EOS");
       transport->input_pending = 0;  // XXX ???
-      if (!transport->posted_tail_closed) {
-        pn_collector_t *collector = pni_transport_collector(transport);
-        pn_collector_put(collector, PN_OBJECT, transport, PN_TRANSPORT_TAIL_CLOSED);
-        transport->posted_tail_closed = true;
-        pni_maybe_post_closed(transport);
-      }
       return n;
     }
   }
@@ -2185,13 +2171,6 @@ ssize_t pn_transport_push(pn_transport_t *transport, const char *src,
size_t siz
   }
 }
 
-void pni_close_tail(pn_transport_t *transport)
-{
-  if (!transport->tail_closed) {
-    transport->tail_closed = true;
-  }
-}
-
 int pn_transport_process(pn_transport_t *transport, size_t size)
 {
   assert(transport);

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/51a757bc/proton-c/src/windows/schannel.c
----------------------------------------------------------------------
diff --git a/proton-c/src/windows/schannel.c b/proton-c/src/windows/schannel.c
index e91e0a3..9437582 100644
--- a/proton-c/src/windows/schannel.c
+++ b/proton-c/src/windows/schannel.c
@@ -520,8 +520,6 @@ int pn_ssl_get_peer_hostname( pn_ssl_t *ssl, char *hostname, size_t *bufsize
)
 
 /** SChannel specific: */
 
-<<<<<<< HEAD
-=======
 const char *tls_version_check(pn_ssl_t *ssl)
 {
   SecPkgContext_ConnectionInfo info;
@@ -532,7 +530,6 @@ const char *tls_version_check(pn_ssl_t *ssl)
     "peer does not support TLS 1.0 security" : NULL;
 }
 
->>>>>>> master
 static void ssl_encrypt(pn_ssl_t *ssl, char *app_data, size_t count)
 {
   // Get SChannel to encrypt exactly one Record.
@@ -744,13 +741,10 @@ static void client_handshake( pn_ssl_t* ssl) {
       ssl_failed(ssl, "unexpected final server token");
       break;
     }
-<<<<<<< HEAD
-=======
     if (const char *err = tls_version_check(ssl)) {
       ssl_failed(ssl, err);
       break;
     }
->>>>>>> master
     if (token_buffs[1].BufferType == SECBUFFER_EXTRA && token_buffs[1].cbBuffer >
0) {
       // This seems to work but not documented, plus logic differs from decrypt message
       // since the pvBuffer value is not set.  Grrr.
@@ -923,11 +917,7 @@ static void app_inbytes_progress(pn_ssl_t *ssl, size_t minimum)
       assert(ssl->app_inbytes.size <= ib2.size);
       size_t consumed = ib2.size - ssl->app_inbytes.size;
       if (consumed > 0) {
-<<<<<<< HEAD
-          memmove((void *)ib2.start, ib2.start + consumed, consumed);
-=======
         memmove((void *)ib2.start, ib2.start + consumed, ssl->app_inbytes.size);
->>>>>>> master
         pn_buffer_trim(ssl->inbuf2, 0, consumed);
       }
       if (!pn_buffer_available(ssl->inbuf2)) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message