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>
Mon, 29 Sep 2014 15:01:06 +0000 (16:01 +0100)
commit622e9b68e0433bbe2a4fde6c3dd7b02032af6080
tree34b528f61dd2a5174fb50c90df7d65204d73c6b6
parentddb488b773243d36be08f51267597c26686c6469
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