Page MenuHomePhabricator

[CommCoreModule] Fill out `sessionSignature(deviceID) => toSign` boilerplate in `Client`
ClosedPublic

Authored by atul on Feb 8 2022, 1:35 PM.
Tags
None
Referenced Files
Unknown Object (File)
Nov 18 2024, 4:48 AM
Unknown Object (File)
Nov 18 2024, 4:34 AM
Unknown Object (File)
Nov 18 2024, 4:19 AM
Unknown Object (File)
Nov 18 2024, 4:15 AM
Unknown Object (File)
Nov 18 2024, 2:47 AM
Unknown Object (File)
Nov 2 2024, 4:38 AM
Unknown Object (File)
Oct 25 2024, 12:01 AM
Unknown Object (File)
Oct 25 2024, 12:01 AM

Details

Summary

So we can hit SessionSignature(...) endpoint

Test Plan

Hit tunnelbroker with request and see if we get a response

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Feb 8 2022, 1:38 PM
Harbormaster failed remote builds in B6651: Diff 9416!
atul requested review of this revision.Feb 8 2022, 1:44 PM
This revision is now accepted and ready to land.Feb 8 2022, 1:47 PM
This revision now requires review to proceed.Feb 8 2022, 1:47 PM
ashoat added a reviewer: jim.
ashoat added inline comments.
native/cpp/CommonCpp/grpc/Client.cpp
138 ↗(On Diff #9416)

So what's going on here... NULL is a c-str and that get initialized into an std::string? Is this the best pattern?

This revision is now accepted and ready to land.Feb 8 2022, 9:40 PM
native/cpp/CommonCpp/grpc/Client.cpp
138 ↗(On Diff #9416)

NULL == nullptr since C++ 11 so the function would return nullptr

At the callsite we'll check the truthiness of the return value

138 ↗(On Diff #9416)

Can be more explicit and return nullptr?

native/cpp/CommonCpp/grpc/Client.cpp
138 ↗(On Diff #9416)

Just kidding... Looks like the right thing to do is

return std::string{};

and check for empty string

if (blah.empty()) {
  return;
}
native/cpp/CommonCpp/grpc/Client.cpp
138 ↗(On Diff #9416)

Alternatively I guess could return a std::optional<std::string>> or tuple of (grpc::Status, std::optional<std::string>) or something

replace NULL with empty string

This revision was landed with ongoing or failed builds.Feb 9 2022, 10:34 AM
This revision was automatically updated to reflect the committed changes.