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>
Thu, 2 Oct 2014 15:40:16 +0000 (16:40 +0100)
commitde89be56f4377d81b8f55ca1a6e9fd09f14feaa8
tree11e7c08eb17067744fa87ba00169c86169deba04
parentdc6f1ac81dd2460fcd241f05654d02713b1aaeb7
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