{"action":"closed","issue":{"url":"https://api.github.com/repos/ARMmbed/sockets/issues/48","labels_url":"https://api.github.com/repos/ARMmbed/sockets/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/ARMmbed/sockets/issues/48/comments","events_url":"https://api.github.com/repos/ARMmbed/sockets/issues/48/events","html_url":"https://github.com/ARMmbed/sockets/issues/48","id":123639730,"number":48,"title":"Documentation and error checking omissions","user":{"login":"adbridge","id":11191917,"avatar_url":"https://avatars.githubusercontent.com/u/11191917?v=3","gravatar_id":"","url":"https://api.github.com/users/adbridge","html_url":"https://github.com/adbridge","followers_url":"https://api.github.com/users/adbridge/followers","following_url":"https://api.github.com/users/adbridge/following{/other_user}","gists_url":"https://api.github.com/users/adbridge/gists{/gist_id}","starred_url":"https://api.github.com/users/adbridge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adbridge/subscriptions","organizations_url":"https://api.github.com/users/adbridge/orgs","repos_url":"https://api.github.com/users/adbridge/repos","events_url":"https://api.github.com/users/adbridge/events{/privacy}","received_events_url":"https://api.github.com/users/adbridge/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ARMmbed/sockets/labels/mirrored","name":"mirrored","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-23T11:00:41Z","updated_at":"2016-01-27T11:15:58Z","closed_at":"2016-01-27T11:15:58Z","body":"1. send_to()\r\na) Implementation returns a specific error code if the socket is not open but this is not documented in the header.\r\nb) Header specifies that the method is not valid for SOCK_STREAM so should probably state what the error condition returned is if SOCK_STREAM does get used?\r\nc) Should check that remote_addr is not NULL before dereferencing in the implementation\r\n\r\n2. send()\r\na) Implementation returns a specific error code if the socket is not open but this is not documented in the header.\r\nb) Documentation says that this method is not valid for UDP unless connect() has previously been called. Should document the expected error returned if this is not the case.\r\n\r\n3. recv ()\r\na) Implementation returns a specific error code if the socket is not open but this is not documented in the header.\r\n\r\n4. recv_from()\r\na) Implementation returns a specific error code if the socket is not open but this is not documented in the header.\r\nb) Should check that remote_addr is not NULL before dereferencing\r\n\r\n5 General\r\nAny pointer dereferenced directly within the method implementation should be checked for being non-NULL before dereferencing. Any pointers passed down to the API do not need to be checked as it can be the responsibility of the API to do so.\r\n"}}