[mesos] 01/02: Fix `link::lo()` to deal with `None` value.
This is an automated email from the ASF dual-hosted git repository. abudnik pushed a commit to branch 1.5.x in repository https://gitbox.apache.org/repos/asf/mesos.git commit d24d0c71f6e4b6f5c8b98c0f90ec2728fc0372b2 Author: Pavel Kirillov <49415588+pashakiril...@users.noreply.github.com> AuthorDate: Tue Apr 9 15:44:24 2019 +0200 Fix `link::lo()` to deal with `None` value. Some network links may cause `link::internal::test(link, IFF_LOOPBACK)` to be `None`. `Link::lo` should deal with `None` values of test var. This closes #330 --- src/linux/routing/link/link.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/linux/routing/link/link.cpp b/src/linux/routing/link/link.cpp index 5388a3d..ef83bc8 100644 --- a/src/linux/routing/link/link.cpp +++ b/src/linux/routing/link/link.cpp @@ -99,7 +99,7 @@ Result lo() Result test = link::internal::test(link, IFF_LOOPBACK); if (test.isError()) { return Error("Failed to check the flag on link: " + link); -} else if (test.get()) { +} else if (test.isSome() && test.get()) { return link; } }
[mesos] 01/02: Fix `link::lo()` to deal with `None` value.
This is an automated email from the ASF dual-hosted git repository. abudnik pushed a commit to branch 1.6.x in repository https://gitbox.apache.org/repos/asf/mesos.git commit ee630c7f8db2e59ca92f286f246bd1b5b4f39d21 Author: Pavel Kirillov <49415588+pashakiril...@users.noreply.github.com> AuthorDate: Tue Apr 9 15:44:24 2019 +0200 Fix `link::lo()` to deal with `None` value. Some network links may cause `link::internal::test(link, IFF_LOOPBACK)` to be `None`. `Link::lo` should deal with `None` values of test var. This closes #330 --- src/linux/routing/link/link.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/linux/routing/link/link.cpp b/src/linux/routing/link/link.cpp index 9dc30c5..bff172d 100644 --- a/src/linux/routing/link/link.cpp +++ b/src/linux/routing/link/link.cpp @@ -99,7 +99,7 @@ Result lo() Result test = link::internal::test(link, IFF_LOOPBACK); if (test.isError()) { return Error("Failed to check the flag on link: " + link); -} else if (test.get()) { +} else if (test.isSome() && test.get()) { return link; } }
[mesos] 01/02: Fix `link::lo()` to deal with `None` value.
This is an automated email from the ASF dual-hosted git repository. abudnik pushed a commit to branch 1.7.x in repository https://gitbox.apache.org/repos/asf/mesos.git commit 8ac30a58373b4575892cd8647bd5f731cd31ffd6 Author: Pavel Kirillov <49415588+pashakiril...@users.noreply.github.com> AuthorDate: Tue Apr 9 15:44:24 2019 +0200 Fix `link::lo()` to deal with `None` value. Some network links may cause `link::internal::test(link, IFF_LOOPBACK)` to be `None`. `Link::lo` should deal with `None` values of test var. This closes #330 --- src/linux/routing/link/link.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/linux/routing/link/link.cpp b/src/linux/routing/link/link.cpp index 9dc30c5..bff172d 100644 --- a/src/linux/routing/link/link.cpp +++ b/src/linux/routing/link/link.cpp @@ -99,7 +99,7 @@ Result lo() Result test = link::internal::test(link, IFF_LOOPBACK); if (test.isError()) { return Error("Failed to check the flag on link: " + link); -} else if (test.get()) { +} else if (test.isSome() && test.get()) { return link; } }
[mesos] 01/02: Fix `link::lo()` to deal with `None` value.
This is an automated email from the ASF dual-hosted git repository. abudnik pushed a commit to branch 1.8.x in repository https://gitbox.apache.org/repos/asf/mesos.git commit 7d7d8db9b9963e9a079bee54f06e3aac97f7910c Author: Pavel Kirillov <49415588+pashakiril...@users.noreply.github.com> AuthorDate: Tue Apr 9 15:44:24 2019 +0200 Fix `link::lo()` to deal with `None` value. Some network links may cause `link::internal::test(link, IFF_LOOPBACK)` to be `None`. `Link::lo` should deal with `None` values of test var. This closes #330 --- src/linux/routing/link/link.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/linux/routing/link/link.cpp b/src/linux/routing/link/link.cpp index 9dc30c5..bff172d 100644 --- a/src/linux/routing/link/link.cpp +++ b/src/linux/routing/link/link.cpp @@ -99,7 +99,7 @@ Result lo() Result test = link::internal::test(link, IFF_LOOPBACK); if (test.isError()) { return Error("Failed to check the flag on link: " + link); -} else if (test.get()) { +} else if (test.isSome() && test.get()) { return link; } }