#endif
char *meshlink_get_local_address_for_family(meshlink_handle_t *mesh, int family) {
- (void)mesh;
+ if(!mesh) {
+ meshlink_errno = MESHLINK_EINVAL;
+ return NULL;
+ }
// Determine address of the local interface used for outgoing connections.
char localaddr[NI_MAXHOST];
}
void meshlink_set_channel_sndbuf(meshlink_handle_t *mesh, meshlink_channel_t *channel, size_t size) {
- (void)mesh;
-
- if(!channel) {
+ if(!mesh || !channel) {
meshlink_errno = MESHLINK_EINVAL;
return;
}
}
void meshlink_set_channel_rcvbuf(meshlink_handle_t *mesh, meshlink_channel_t *channel, size_t size) {
- (void)mesh;
-
- if(!channel) {
+ if(!mesh || !channel) {
meshlink_errno = MESHLINK_EINVAL;
return;
}