Skip to content

Corrected asynchronous DNS functionality #7016

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

Merged
merged 1 commit into from
May 29, 2018
Merged

Corrected asynchronous DNS functionality #7016

merged 1 commit into from
May 29, 2018

Conversation

mikaleppanen
Copy link

Description

Made fixes to asynchronous DNS. These are fixes to PR: #6847

List of changes:

  • Set network stack to store event queue so that mbed::mbed_event_queue() call
    is not needed every time call_in() is called
  • Added dns state variables and enum (states are: created, initiated and cancelled)
  • Corrected DNS response handling so that if DNS server returns that host name is
    unknown the DNS query is not tried again
  • Reorder mutexes in nsapi_dns_query_multiple_async()
  • Created nsapi_dns_query_async_initiate_next() function to initiate the next
    DNS query from the queue after delete of previous query
  • Added dsn_timer_running variable to supervise DNS timer start/stop
  • Changed cancel function to only mark query as deleted and moved deletion
    to timer function. This allows to run socket close on DNS thread
  • Added new nsapi error NSAPI_ERROR_TIMEOUT for DNS (and other) timeouts

Pull request type

[X] Fix
[ ] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change

- Set network stack to store event queue so that mbed::mbed_event_queue() call
  is not needed every time call_in() is called
- Added dns state variables and enum (states are: created, initiated and cancelled)
- Corrected DNS response handling so that if DNS server returns that host name is
  unknown the DNS query is not tried again
- Reorder mutexes in nsapi_dns_query_multiple_async()
- Created nsapi_dns_query_async_initiate_next() function to initiate the next
  DNS query from the queue after delete of previous query
- Added dsn_timer_running variable to supervise DNS timer start/stop
- Changed cancel function to only mark query as deleted and moved deletion
  to timer function. This allows to run socket close on DNS thread
- Added new nsapi error NSAPI_ERROR_TIMEOUT for DNS (and other) timeouts
@mikaleppanen
Copy link
Author

@kjbracey-arm Please review.

@0xc0170 0xc0170 requested a review from a team May 25, 2018 08:56
Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not certain about the squash to one commit

The changes LGTM

@0xc0170
Copy link
Contributor

0xc0170 commented May 29, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented May 29, 2018

Build : SUCCESS

Build number : 2184
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7016/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented May 29, 2018

@mbed-ci
Copy link

mbed-ci commented May 29, 2018

@cmonr cmonr merged commit 24cebba into ARMmbed:master May 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants