Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider sharing "hex digit to int" code instead of duplicating it #3769

Open
bzbarsky-apple opened this issue Nov 11, 2020 · 6 comments
Open
Assignees
Labels
enhancement New feature or request future p2 priority 2 work security V1.X

Comments

@bzbarsky-apple
Copy link
Contributor

Problem

HexDigitToInt in BleUUID.cpp and HexToInt in src/lib/mdns/DiscoveryManager.cpp look like the same function.

Proposed Solution

Should probably be moved to a utility place of some sort.

@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.82. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@bzbarsky-apple
Copy link
Contributor Author

@gjc13

@gjc13 gjc13 self-assigned this Nov 11, 2020
@gjc13
Copy link
Contributor

gjc13 commented Nov 11, 2020

Ack

gjc13 added a commit to gjc13/connectedhomeip that referenced this issue Nov 17, 2020
As we are moving toward a self-built mdns library in embedded systems
and can know precisely about the TTL of each service, we can now enable
caching for mdns services.

Changes include:
  * Implemented a hash map for saving the mdns entries.
  * Modify the platform mdns api to get the notifications from the
  underlying library.
  * Add unit tests for the has map.
  * Add functional tests for the DiscoveryManager
  * Also resolves
  project-chip#3769
gjc13 added a commit to gjc13/connectedhomeip that referenced this issue Nov 17, 2020
As we are moving toward a self-built mdns library in embedded systems
and can know precisely about the TTL of each service, we can now enable
caching for mdns services.

Changes include:
  * Implemented a hash map for saving the mdns entries.
  * Modify the platform mdns api to get the notifications from the
  underlying library.
  * Add unit tests for the hash map.
  * Add functional tests for the DiscoveryManager
  * Also resolves
  project-chip#3769
gjc13 added a commit to gjc13/connectedhomeip that referenced this issue Nov 17, 2020
As we are moving toward a self-built mdns library in embedded systems
and can know precisely about the TTL of each service, we can now enable
caching for mdns services.

Changes include:
  * Implemented a hash map for saving the mdns entries.
  * Modify the platform mdns api to get the notifications from the
  underlying library.
  * Add unit tests for the hash map.
  * Add functional tests for the DiscoveryManager
  * Also resolves
  project-chip#3769
gjc13 added a commit to gjc13/connectedhomeip that referenced this issue Nov 17, 2020
As we are moving toward a self-built mdns library in embedded systems
and can know precisely about the TTL of each service, we can now enable
caching for mdns services.

Changes include:
  * Implemented a hash map for saving the mdns entries.
  * Modify the platform mdns api to get the notifications from the
  underlying library.
  * Add unit tests for the hash map.
  * Add functional tests for the DiscoveryManager
  * Also resolves
  project-chip#3769
gjc13 added a commit to gjc13/connectedhomeip that referenced this issue Nov 17, 2020
As we are moving toward a self-built mdns library in embedded systems
and can know precisely about the TTL of each service, we can now enable
caching for mdns services.

Changes include:
  * Implemented a hash map for saving the mdns entries.
  * Modify the platform mdns api to get the notifications from the
  underlying library.
  * Add unit tests for the hash map.
  * Add functional tests for the DiscoveryManager
  * Also resolves
  project-chip#3769
gjc13 added a commit to gjc13/connectedhomeip that referenced this issue Nov 17, 2020
As we are moving toward a self-built mdns library in embedded systems
and can know precisely about the TTL of each service, we can now enable
caching for mdns services.

Changes include:
  * Implemented a hash map for saving the mdns entries.
  * Modify the platform mdns api to get the notifications from the
  underlying library.
  * Add unit tests for the hash map.
  * Add functional tests for the DiscoveryManager
  * Also resolves
  project-chip#3769
gjc13 added a commit to gjc13/connectedhomeip that referenced this issue Nov 17, 2020
As we are moving toward a self-built mdns library in embedded systems
and can know precisely about the TTL of each service, we can now enable
caching for mdns services.

Changes include:
  * Implemented a hash map for saving the mdns entries.
  * Modify the platform mdns api to get the notifications from the
  underlying library.
  * Add unit tests for the hash map.
  * Add functional tests for the DiscoveryManager
  * Also resolves
  project-chip#3769
gjc13 added a commit to gjc13/connectedhomeip that referenced this issue Nov 17, 2020
As we are moving toward a self-built mdns library in embedded systems
and can know precisely about the TTL of each service, we can now enable
caching for mdns services.

Changes include:
  * Implemented a hash map for saving the mdns entries.
  * Modify the platform mdns api to get the notifications from the
  underlying library.
  * Add unit tests for the hash map.
  * Add functional tests for the DiscoveryManager
  * Also resolves
  project-chip#3769
gjc13 added a commit to gjc13/connectedhomeip that referenced this issue Nov 23, 2020
As we are moving toward a self-built mdns library in embedded systems
and can know precisely about the TTL of each service, we can now enable
caching for mdns services.

Changes include:
  * Implemented a hash map for saving the mdns entries.
  * Modify the platform mdns api to get the notifications from the
  underlying library.
  * Add unit tests for the hash map.
  * Add functional tests for the DiscoveryManager
  * Also resolves
  project-chip#3769
gjc13 added a commit to gjc13/connectedhomeip that referenced this issue Nov 26, 2020
As we are moving toward a self-built mdns library in embedded systems
and can know precisely about the TTL of each service, we can now enable
caching for mdns services.

Changes include:
  * Implemented a hash map for saving the mdns entries.
  * Modify the platform mdns api to get the notifications from the
  underlying library.
  * Add unit tests for the hash map.
  * Add functional tests for the DiscoveryManager
  * Also resolves
  project-chip#3769
gjc13 added a commit to gjc13/connectedhomeip that referenced this issue Dec 2, 2020
As we are moving toward a self-built mdns library in embedded systems
and can know precisely about the TTL of each service, we can now enable
caching for mdns services.

Changes include:
  * Implemented a hash map for saving the mdns entries.
  * Modify the platform mdns api to get the notifications from the
  underlying library.
  * Add unit tests for the hash map.
  * Add functional tests for the DiscoveryManager
  * Also resolves
  project-chip#3769
gjc13 added a commit to gjc13/connectedhomeip that referenced this issue Dec 8, 2020
As we are moving toward a self-built mdns library in embedded systems
and can know precisely about the TTL of each service, we can now enable
caching for mdns services.

Changes include:
  * Implemented a hash map for saving the mdns entries.
  * Modify the platform mdns api to get the notifications from the
  underlying library.
  * Add unit tests for the hash map.
  * Add functional tests for the DiscoveryManager
  * Also resolves
  project-chip#3769
gjc13 added a commit to gjc13/connectedhomeip that referenced this issue Dec 9, 2020
As we are moving toward a self-built mdns library in embedded systems
and can know precisely about the TTL of each service, we can now enable
caching for mdns services.

Changes include:
  * Implemented a hash map for saving the mdns entries.
  * Modify the platform mdns api to get the notifications from the
  underlying library.
  * Add unit tests for the hash map.
  * Add functional tests for the DiscoveryManager
  * Also resolves
  project-chip#3769
gjc13 added a commit to gjc13/connectedhomeip that referenced this issue Dec 10, 2020
As we are moving toward a self-built mdns library in embedded systems
and can know precisely about the TTL of each service, we can now enable
caching for mdns services.

Changes include:
  * Implemented a hash map for saving the mdns entries.
  * Modify the platform mdns api to get the notifications from the
  underlying library.
  * Add unit tests for the hash map.
  * Add functional tests for the DiscoveryManager
  * Also resolves
  project-chip#3769
gjc13 added a commit to gjc13/connectedhomeip that referenced this issue Dec 11, 2020
As we are moving toward a self-built mdns library in embedded systems
and can know precisely about the TTL of each service, we can now enable
caching for mdns services.

Changes include:
  * Implemented a hash map for saving the mdns entries.
  * Modify the platform mdns api to get the notifications from the
  underlying library.
  * Add unit tests for the hash map.
  * Add functional tests for the DiscoveryManager
  * Also resolves
  project-chip#3769
gjc13 added a commit to gjc13/connectedhomeip that referenced this issue Dec 23, 2020
As we are moving toward a self-built mdns library in embedded systems
and can know precisely about the TTL of each service, we can now enable
caching for mdns services.

Changes include:
  * Implemented a hash map for saving the mdns entries.
  * Modify the platform mdns api to get the notifications from the
  underlying library.
  * Add unit tests for the hash map.
  * Add functional tests for the DiscoveryManager
  * Also resolves
  project-chip#3769
gjc13 added a commit to gjc13/connectedhomeip that referenced this issue Jan 6, 2021
As we are moving toward a self-built mdns library in embedded systems
and can know precisely about the TTL of each service, we can now enable
caching for mdns services.

Changes include:
  * Implemented a hash map for saving the mdns entries.
  * Modify the platform mdns api to get the notifications from the
  underlying library.
  * Add unit tests for the hash map.
  * Add functional tests for the DiscoveryManager
  * Also resolves
  project-chip#3769
@Damian-Nordic
Copy link
Contributor

@bzbarsky-apple I think @gjc13 fixed the issue, but didn't use the magic word "fix" in the PR, so the issue didn't get closed automatically ;).

@bzbarsky-apple
Copy link
Contributor Author

No, this is not fixed. In particular, the PR that all the noise is about above never got landed.

@bzbarsky-apple bzbarsky-apple reopened this Feb 9, 2021
@woody-apple woody-apple added enhancement New feature or request and removed feature request labels Feb 15, 2021
@woody-apple woody-apple added security p2 priority 2 work labels Feb 15, 2021
@andy31415 andy31415 added v1_triage_split_8 enhancement New feature or request p2 priority 2 work V1.0 security future and removed enhancement New feature or request p2 priority 2 work V1.0 security future labels Jan 30, 2022
@cecille
Copy link
Contributor

cecille commented Jan 31, 2022

Some of this code has changed, but HexDigitToInt could probably use the Encoding::HexToBytes function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request future p2 priority 2 work security V1.X
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants