You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2015/06/03 19:25:30 UTC
[07/50] [abbrv] qpid-proton git commit: NO-JIRA: set initial
transport frame size to 512
NO-JIRA: set initial transport frame size to 512
- Added a configuration file named config.h where various parameters
should be configurable (like transport initial frame buffer size, pnin
the future _data initial size, etc.)
- Added config.h to the CmakeLists.txt so that it shows up also in the
Proton.sln Windows solution
- Set initial transport frame buffer size to 512 instead of 4K
Closes #25
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/1fe0aa24
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/1fe0aa24
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/1fe0aa24
Branch: refs/heads/cjansen-cpp-client
Commit: 1fe0aa244f48032e8a60addd7efb20a438118607
Parents: 520f0d8
Author: dcristoloveanu <dc...@microsoft.com>
Authored: Mon May 11 10:30:30 2015 -0700
Committer: Dominic Evans <do...@uk.ibm.com>
Committed: Tue May 12 11:38:06 2015 +0100
----------------------------------------------------------------------
proton-c/CMakeLists.txt | 2 ++
proton-c/src/config.h | 26 ++++++++++++++++++++++++++
proton-c/src/transport/transport.c | 3 ++-
3 files changed, 30 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/1fe0aa24/proton-c/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/proton-c/CMakeLists.txt b/proton-c/CMakeLists.txt
index 6ab9695..1347f16 100644
--- a/proton-c/CMakeLists.txt
+++ b/proton-c/CMakeLists.txt
@@ -342,6 +342,8 @@ set (qpid-proton-core
src/messenger/transform.c
src/selectable.c
+ src/config.h
+
${CMAKE_CURRENT_BINARY_DIR}/src/encodings.h
${CMAKE_CURRENT_BINARY_DIR}/src/protocol.h
)
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/1fe0aa24/proton-c/src/config.h
----------------------------------------------------------------------
diff --git a/proton-c/src/config.h b/proton-c/src/config.h
new file mode 100644
index 0000000..9bc5b27
--- /dev/null
+++ b/proton-c/src/config.h
@@ -0,0 +1,26 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+
+#ifndef _PROTON_SRC_CONFIG_H
+#define _PROTON_SRC_CONFIG_H
+
+#define TRANSPORT_INITIAL_FRAME_SIZE (512) /* bytes */
+
+#endif /* _PROTON_SRC_CONFIG_H */
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/1fe0aa24/proton-c/src/transport/transport.c
----------------------------------------------------------------------
diff --git a/proton-c/src/transport/transport.c b/proton-c/src/transport/transport.c
index 46d6364..c0269d9 100644
--- a/proton-c/src/transport/transport.c
+++ b/proton-c/src/transport/transport.c
@@ -30,6 +30,7 @@
#include "proton/event.h"
#include "platform.h"
#include "platform_fmt.h"
+#include "config.h"
#include "../log_private.h"
#include <stdlib.h>
@@ -349,7 +350,7 @@ static void pn_transport_initialize(void *object)
transport->scratch = pn_string(NULL);
transport->args = pn_data(16);
transport->output_args = pn_data(16);
- transport->frame = pn_buffer(4*1024);
+ transport->frame = pn_buffer(TRANSPORT_INITIAL_FRAME_SIZE);
transport->input_frames_ct = 0;
transport->output_frames_ct = 0;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org