You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by fgiorgetti <gi...@git.apache.org> on 2018/04/26 02:47:26 UTC
[GitHub] qpid-dispatch pull request #294: DISPATCH-960 - Resolving service port when ...
GitHub user fgiorgetti opened a pull request:
https://github.com/apache/qpid-dispatch/pull/294
DISPATCH-960 - Resolving service port when using http listener
As suggested by @ted-ross, I am re-submitting this PR again now using getservbyname_r which is multi-thread safe.
If you find any other possible issue, please let me know.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/fgiorgetti/qpid-dispatch fgiorgetti-DISPATCH-960
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/qpid-dispatch/pull/294.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #294
----
commit 1fbfb14dee43f00113002d308e1862213edb2f7e
Author: Fernando Giorgetti <fg...@...>
Date: 2018-04-10T19:39:27Z
DISPATCH-960 - Resolving service port when using http listener
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org
[GitHub] qpid-dispatch issue #294: DISPATCH-960 - Resolving service port when using h...
Posted by fgiorgetti <gi...@git.apache.org>.
Github user fgiorgetti commented on the issue:
https://github.com/apache/qpid-dispatch/pull/294
Removed as suggested. It seems to be working just fine for me.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org
[GitHub] qpid-dispatch pull request #294: DISPATCH-960 - Resolving service port when ...
Posted by ted-ross <gi...@git.apache.org>.
Github user ted-ross commented on a diff in the pull request:
https://github.com/apache/qpid-dispatch/pull/294#discussion_r184679766
--- Diff: src/amqp.c ---
@@ -73,11 +76,30 @@ const char * const QD_AMQP_COND_FRAME_SIZE_TOO_SMALL = "amqp:frame-size-too-smal
const char * const QD_AMQP_PORT_STR = "5672";
const char * const QD_AMQPS_PORT_STR = "5671";
+const char * const QD_AMQP_DFLT_PROTO = "tcp";
+
int qd_port_int(const char* port_str) {
if (!strcmp(port_str, QD_AMQP_PORT_STR)) return QD_AMQP_PORT_INT;
--- End diff --
I understand that this is not part of the pull request, but aren't these lines (with strcmp) redundant with the strtoul below?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org
[GitHub] qpid-dispatch pull request #294: DISPATCH-960 - Resolving service port when ...
Posted by fgiorgetti <gi...@git.apache.org>.
Github user fgiorgetti commented on a diff in the pull request:
https://github.com/apache/qpid-dispatch/pull/294#discussion_r184743211
--- Diff: src/amqp.c ---
@@ -73,11 +76,30 @@ const char * const QD_AMQP_COND_FRAME_SIZE_TOO_SMALL = "amqp:frame-size-too-smal
const char * const QD_AMQP_PORT_STR = "5672";
const char * const QD_AMQPS_PORT_STR = "5671";
+const char * const QD_AMQP_DFLT_PROTO = "tcp";
+
int qd_port_int(const char* port_str) {
if (!strcmp(port_str, QD_AMQP_PORT_STR)) return QD_AMQP_PORT_INT;
--- End diff --
You're right. Maybe I should submit a new PR without the strcmp, as service name is now being resolved when strtoul returns 0. And also, using static values for amqp/amqps can also be a problem, in case someone changes the default values at /etc/services (no supposed to happen, but it is possible).
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org