[bt][fidl] ConnectL2Cap returns nullable socket

Sockets with ZX_INVALID_HANDLE can't be passed through FIDL, so there is
no way to send a non-handle if the channel opening fails somehow.  Make
the socket return nullable.

Previously this would crash the FIDL connection as the profile server
delivers an invalid socket in this case.

BT-659

Test: new integration test: connect_unknown_peer
  fx run-test bluetooth-tests -t bt-integration-tests

Change-Id: I4f9114c1cd43f0b3a703573b74d934f3274bf5d6
3 files changed
tree: ecb73c8788b2d145f92be6506f7486de18602781
  1. boards/
  2. build/
  3. buildtools/
  4. bundles/
  5. docs/
  6. examples/
  7. garnet/
  8. infra/
  9. peridot/
  10. products/
  11. scripts/
  12. sdk/
  13. src/
  14. third_party/
  15. tools/
  16. zircon/
  17. .clang-format
  18. .clang-tidy
  19. .dir-locals.el
  20. .gitattributes
  21. .gitignore
  22. .gn
  23. AUTHORS
  24. BUILD.gn
  25. CODE_OF_CONDUCT.md
  26. CONTRIBUTING.md
  27. LICENSE
  28. OWNERS
  29. PATENTS
  30. README.md
  31. rustfmt.toml
README.md

Fuchsia

Pink + Purple == Fuchsia (a new operating system)

What is Fuchsia?

Fuchsia is a modular, capability-based operating system. Fuchsia runs on modern 64-bit Intel and ARM processors.

Fuchsia is an open source project with a code of conduct that we expect everyone who interacts with the project to respect.

How can I build and run Fuchsia?

See Getting Started.

Where can I learn more about Fuchsia?

See the documentation.