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

Corrected asynchronous DNS functionality #7016

Merged
merged 1 commit into from May 29, 2018

Conversation

Projects
None yet
6 participants
@mikaleppanen
Contributor

mikaleppanen commented May 25, 2018

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
Corrected asynchronous DNS functionality
- 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

This comment has been minimized.

Contributor

mikaleppanen commented May 25, 2018

@kjbracey-arm Please review.

@0xc0170 0xc0170 requested a review from ARMmbed/mbed-os-ipcore May 25, 2018

@0xc0170

Not certain about the squash to one commit

The changes LGTM

@0xc0170 0xc0170 added needs: CI and removed needs: review labels May 28, 2018

@0xc0170

This comment has been minimized.

Member

0xc0170 commented May 29, 2018

/morph build

@mbed-ci

This comment has been minimized.

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

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@cmonr cmonr added ready for merge and removed needs: CI labels May 29, 2018

@cmonr cmonr merged commit 24cebba into ARMmbed:master May 29, 2018

13 checks passed

AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
travis-ci/astyle Passed, 906 files
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 10218 cycles (+1167 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/littlefs Passed, code size is 9964B (+0.00%)
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details

@cmonr cmonr removed the ready for merge label May 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment