chiark / gitweb /
comm: Make udp_make_socket be able to tolerate failures
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 22 Sep 2014 01:07:47 +0000 (02:07 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 8 Oct 2014 17:25:17 +0000 (18:25 +0100)
commit53f4e66603bcc2d21c70ad7a69db5fda6da5d645
treedd04d29f2396224dd19bff876e70034f67ea4101
parentf7af31926b95660b98177fb4fd48c72edf32944d
comm: Make udp_make_socket be able to tolerate failures

Previously, it would log errors with fatal or fatal_perror.  Now it
takes a message class and uses lg_perror, and also returns a boolean
to let the caller know whether it worked.

The repetitive calls to fatal_perror in udp_make_socket have been
replaced with a couple of macros.

The one existing call site passes M_FATAL.  So no substantial
functional change in this patch.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
comm-common.h
udp.c