]> git.decadent.org.uk Git - nfs-utils.git/commit - utils/statd/sm-notify.c
sm-notify: factor socket creation out of notify()
authorChuck Lever <chuck.lever@oracle.com>
Thu, 14 Jan 2010 17:22:26 +0000 (12:22 -0500)
committerSteve Dickson <steved@redhat.com>
Fri, 15 Jan 2010 19:55:51 +0000 (14:55 -0500)
commit56f9d50712481ed0f84f26e3a9f9dd012cf1995f
treed89446214a1ae9d673e8ce81c934c5cd69980c0d
parent4f3f745c172202bf3846f8f1ee5d0a430b6014af
sm-notify: factor socket creation out of notify()

The top half of the notify() function creates the main socket that
sm-notify uses to do its job.  To make adding IPv6 support simpler,
refactor that piece into a separate function.

The logic is modified slightly so that exit(3) is invoked only in
main().  This is not required, but it makes the code slightly easier
to understand and maintain.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
utils/statd/sm-notify.c