Return-Path: X-Original-To: apmail-qpid-commits-archive@www.apache.org Delivered-To: apmail-qpid-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D5DE918B04 for ; Mon, 15 Feb 2016 21:33:08 +0000 (UTC) Received: (qmail 22931 invoked by uid 500); 15 Feb 2016 21:33:08 -0000 Delivered-To: apmail-qpid-commits-archive@qpid.apache.org Received: (qmail 22905 invoked by uid 500); 15 Feb 2016 21:33:08 -0000 Mailing-List: contact commits-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list commits@qpid.apache.org Received: (qmail 22896 invoked by uid 99); 15 Feb 2016 21:33:08 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Feb 2016 21:33:08 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 98E35E057C; Mon, 15 Feb 2016 21:33:08 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: astitcher@apache.org To: commits@qpid.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: qpid-proton git commit: PROTON-988: Make pn_messenger_set_flags() work correctly Date: Mon, 15 Feb 2016 21:33:08 +0000 (UTC) Repository: qpid-proton Updated Branches: refs/heads/master ca433506c -> f77163529 PROTON-988: Make pn_messenger_set_flags() work correctly Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/f7716352 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/f7716352 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/f7716352 Branch: refs/heads/master Commit: f77163529d8b29d459ee8d1948b8ad829f63a545 Parents: ca43350 Author: Andrew Stitcher Authored: Mon Feb 15 16:03:34 2016 -0500 Committer: Andrew Stitcher Committed: Mon Feb 15 16:30:53 2016 -0500 ---------------------------------------------------------------------- proton-c/src/messenger/messenger.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f7716352/proton-c/src/messenger/messenger.c ---------------------------------------------------------------------- diff --git a/proton-c/src/messenger/messenger.c b/proton-c/src/messenger/messenger.c index a376988..64be017 100644 --- a/proton-c/src/messenger/messenger.c +++ b/proton-c/src/messenger/messenger.c @@ -2357,9 +2357,13 @@ int pn_messenger_set_flags(pn_messenger_t *messenger, const int flags) { if (!messenger) return PN_ARG_ERR; - if (flags != 0 && (flags ^ PN_FLAGS_CHECK_ROUTES) != 0) + if (flags == 0) { + messenger->flags = 0; + } else if (flags & (PN_FLAGS_CHECK_ROUTES | PN_FLAGS_ALLOW_INSECURE_MECHS)) { + messenger->flags |= flags; + } else { return PN_ARG_ERR; - messenger->flags = flags; + } return 0; } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org For additional commands, e-mail: commits-help@qpid.apache.org