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

Error in documentation for ESP8266WiFiGenericClass::hostByName #3298

Closed
UlliBien opened this issue May 26, 2017 · 3 comments
Closed

Error in documentation for ESP8266WiFiGenericClass::hostByName #3298

UlliBien opened this issue May 26, 2017 · 3 comments
Labels
component: documentation good first issue If you want to help, this is is a good place to start level: easy

Comments

@UlliBien
Copy link

Basic Infos

Hardware

Core Version: 2.3.0

Description

Ducomentation says:

  • @return 1 if aIPAddrString was successfully converted to an IP address,
  •      else error code
    

In case of an error 0 is returned. No error code

@devyte
Copy link
Collaborator

devyte commented Sep 6, 2017

Where in the docs? Or do you mean the comments in the source?

@UlliBien
Copy link
Author

UlliBien commented Sep 6, 2017

Sorry for my bad explanation.
It's in ESP8266WiFiGeneric.cpp, line 410 ff.

/**
 * Resolve the given hostname to an IP address.
 * @param aHostname     Name to be resolved
 * @param aResult       IPAddress structure to store the returned IP address
 * @return 1 if aIPAddrString was successfully converted to an IP address,
 *          else error code
 */
int ESP8266WiFiGenericClass::hostByName(const char* aHostname, IPAddress& aResult) {
...

The code of the method ends with
return (err == ERR_OK) ? 1 : 0;

which returns 1 or 0, but not an error code.

@igrr igrr added the good first issue If you want to help, this is is a good place to start label Jan 2, 2018
@earlephilhower
Copy link
Collaborator

Fixed via #5325

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: documentation good first issue If you want to help, this is is a good place to start level: easy
Projects
None yet
Development

No branches or pull requests

4 participants