Skip to content

xcm_local_addr() and xcm_remote_addr() may fail to set errno #94

@m-ronnblom

Description

@m-ronnblom

Per the API documentation, xcm_local_addr() and xcm_remote_addr() should set errno.

In many cases in the actual implementation, where NULL is being returned, errno is not modified. This is true for all transports.

xcm_local_addr() and xcm_remote_addr() should probably be made to follow the API contract, and always set errno. In the case the error is recoverable, EAGAIN should probably be used. An alternative approach would be to just set errno to ENOENT in case the address is not available, regardless of reason. The address retrieval functions are not the proper means to discover bad connection state, so that's fine for a usability point of view.

The API documentation should make clear that failure to retrieve the local or remote address is not necessarily a terminal error (i.e., the address may be available on a later stage, e.g., after name resolution has finished).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions