forked from rpms/rpcbind
47 lines
1.5 KiB
Diff
47 lines
1.5 KiB
Diff
|
diff --git a/configure.ac b/configure.ac
|
||
|
index c0ef896..c2069a2 100644
|
||
|
--- a/configure.ac
|
||
|
+++ b/configure.ac
|
||
|
@@ -20,6 +20,12 @@ AM_CONDITIONAL(LIBSETDEBUG, test x$lib_setdebug = xyes)
|
||
|
AC_ARG_ENABLE([warmstarts],
|
||
|
AS_HELP_STRING([--enable-warmstarts], [Enables Warm Starts @<:@default=no@:>@]))
|
||
|
AM_CONDITIONAL(WARMSTART, test x$enable_warmstarts = xyes)
|
||
|
+AS_IF([test x$enable_warmstarts = xyes], [
|
||
|
+ warmstarts_opt=-w
|
||
|
+], [
|
||
|
+ warmstarts_opt=
|
||
|
+])
|
||
|
+AC_SUBST([warmstarts_opt], [$warmstarts_opt])
|
||
|
|
||
|
AC_ARG_ENABLE([rmtcalls],
|
||
|
AS_HELP_STRING([--enable-rmtcalls], [Enables Remote Calls @<:@default=no@:>@]))
|
||
|
diff --git a/src/rpcbind.c b/src/rpcbind.c
|
||
|
index 25d8a90..ecebe97 100644
|
||
|
--- a/src/rpcbind.c
|
||
|
+++ b/src/rpcbind.c
|
||
|
@@ -552,8 +552,10 @@ init_transport(struct netconfig *nconf)
|
||
|
syslog(LOG_ERR, "cannot bind %s on %s: %m",
|
||
|
(hosts[nhostsbak] == NULL) ? "*" :
|
||
|
hosts[nhostsbak], nconf->nc_netid);
|
||
|
- if (res != NULL)
|
||
|
+ if (res != NULL) {
|
||
|
freeaddrinfo(res);
|
||
|
+ res = NULL;
|
||
|
+ }
|
||
|
continue;
|
||
|
} else
|
||
|
checkbind++;
|
||
|
diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in
|
||
|
index 7b1c74b..c892ca8 100644
|
||
|
--- a/systemd/rpcbind.service.in
|
||
|
+++ b/systemd/rpcbind.service.in
|
||
|
@@ -12,7 +12,7 @@ Wants=rpcbind.target
|
||
|
[Service]
|
||
|
Type=notify
|
||
|
# distro can provide a drop-in adding EnvironmentFile=-/??? if needed.
|
||
|
-ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS -w -f
|
||
|
+ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS @warmstarts_opt@ -f
|
||
|
|
||
|
[Install]
|
||
|
WantedBy=multi-user.target
|