You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2018/03/29 11:07:19 UTC

qpid-proton git commit: Revert "PROTON-1809: Unable to receive messages when max-frame-size > 2^20"

Repository: qpid-proton
Updated Branches:
  refs/heads/master e8de49d33 -> b35961172


Revert "PROTON-1809: Unable to receive messages when max-frame-size > 2^20"

This reverts commit e8de49d33b1c750327e6c9a090332953a7669a4d.


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

Branch: refs/heads/master
Commit: b359611727339326ad03a41949d6f9a803e0e58d
Parents: e8de49d
Author: Robbie Gemmell <ro...@apache.org>
Authored: Thu Mar 29 12:05:33 2018 +0100
Committer: Robbie Gemmell <ro...@apache.org>
Committed: Thu Mar 29 12:05:33 2018 +0100

----------------------------------------------------------------------
 proton-c/src/core/engine.c    | 5 ++---
 proton-c/src/core/framing.h   | 1 -
 proton-c/src/core/transport.c | 8 +++-----
 3 files changed, 5 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/b3596117/proton-c/src/core/engine.c
----------------------------------------------------------------------
diff --git a/proton-c/src/core/engine.c b/proton-c/src/core/engine.c
index 070c751..f49886d 100644
--- a/proton-c/src/core/engine.c
+++ b/proton-c/src/core/engine.c
@@ -20,7 +20,6 @@
  */
 
 #include "engine-internal.h"
-#include "framing.h"
 #include <stdlib.h>
 #include <string.h>
 #include "protocol.h"
@@ -988,12 +987,12 @@ pn_session_t *pn_session(pn_connection_t *conn)
   ssn->links = pn_list(PN_WEAKREF, 0);
   ssn->freed = pn_list(PN_WEAKREF, 0);
   ssn->context = pn_record();
-  ssn->incoming_capacity = 0;
+  ssn->incoming_capacity = 1024*1024;
   ssn->incoming_bytes = 0;
   ssn->outgoing_bytes = 0;
   ssn->incoming_deliveries = 0;
   ssn->outgoing_deliveries = 0;
-  ssn->outgoing_window = AMQP_MAX_WINDOW_SIZE;
+  ssn->outgoing_window = 2147483647;
 
   // begin transport state
   memset(&ssn->state, 0, sizeof(ssn->state));

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/b3596117/proton-c/src/core/framing.h
----------------------------------------------------------------------
diff --git a/proton-c/src/core/framing.h b/proton-c/src/core/framing.h
index 92c1f7d..792d664 100644
--- a/proton-c/src/core/framing.h
+++ b/proton-c/src/core/framing.h
@@ -30,7 +30,6 @@
 
 #define AMQP_HEADER_SIZE (8)
 #define AMQP_MIN_MAX_FRAME_SIZE ((uint32_t)512) // minimum allowable max-frame
-#define AMQP_MAX_WINDOW_SIZE (2147483647)
 
 typedef struct {
   uint8_t type;

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/b3596117/proton-c/src/core/transport.c
----------------------------------------------------------------------
diff --git a/proton-c/src/core/transport.c b/proton-c/src/core/transport.c
index b722991..96b54f2 100644
--- a/proton-c/src/core/transport.c
+++ b/proton-c/src/core/transport.c
@@ -1894,12 +1894,10 @@ static size_t pni_session_outgoing_window(pn_session_t *ssn)
 static size_t pni_session_incoming_window(pn_session_t *ssn)
 {
   uint32_t size = ssn->connection->transport->local_max_frame;
-  size_t cap = ssn->incoming_capacity;
-  if (size && cap) {    /* session flow control is enabled if both are specified */
-    if (cap < size) ssn->incoming_capacity = size; /* Must be able to hold 1 frame */
-    return (ssn->incoming_capacity - ssn->incoming_bytes) / size;
+  if (!size) {
+    return 2147483647; // biggest legal value
   } else {
-    return AMQP_MAX_WINDOW_SIZE;
+    return (ssn->incoming_capacity - ssn->incoming_bytes)/size;
   }
 }
 


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