summaryrefslogtreecommitdiff
path: root/rquota_svc.c
diff options
context:
space:
mode:
authorjkar8572 <jkar8572>2002-11-28 22:02:04 +0000
committerjkar8572 <jkar8572>2002-11-28 22:02:04 +0000
commit227feaf313ae6e10cdfb9d4d79c7f9896c773fe5 (patch)
treefe122c51be60c57291a998dafbb6dbe8076e341f /rquota_svc.c
parentc243c5801fe4f8be02c8f716ca2897b083e27c74 (diff)
downloadlinuxquota-227feaf313ae6e10cdfb9d4d79c7f9896c773fe5.tar.gz
Optimized linking with svc_socket.o; fixed error reporting in svc_socket.c (Jan Kara)
Diffstat (limited to 'rquota_svc.c')
-rw-r--r--rquota_svc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/rquota_svc.c b/rquota_svc.c
index 86a8f51..d37d591 100644
--- a/rquota_svc.c
+++ b/rquota_svc.c
@@ -12,7 +12,7 @@
* changes for new utilities by Jan Kara <jack@suse.cz>
* patches by Jani Jaakkola <jjaakkol@cs.helsinki.fi>
*
- * Version: $Id: rquota_svc.c,v 1.12 2002/11/21 21:15:26 jkar8572 Exp $
+ * Version: $Id: rquota_svc.c,v 1.13 2002/11/28 22:02:04 jkar8572 Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -365,6 +365,7 @@ int main(int argc, char **argv)
{
register SVCXPRT *transp;
struct sigaction sa;
+ int sock;
gettexton();
progname = basename(argv[0]);
@@ -384,7 +385,8 @@ int main(int argc, char **argv)
sigaction(SIGINT, &sa, NULL);
sigaction(SIGTERM, &sa, NULL);
- transp = svcudp_create(svcudp_socket (RQUOTAPROG, 1));
+ sock = svcudp_socket(RQUOTAPROG, 1);
+ transp = svcudp_create(sock == -1 ? RPC_ANYSOCK : sock);
if (transp == NULL) {
errstr(_("cannot create udp service.\n"));
exit(1);
@@ -398,7 +400,8 @@ int main(int argc, char **argv)
exit(1);
}
- transp = svctcp_create(svctcp_socket (RQUOTAPROG, 1), 0, 0);
+ sock = svctcp_socket(RQUOTAPROG, 1);
+ transp = svctcp_create(sock == -1 ? RPC_ANYSOCK : sock, 0, 0);
if (transp == NULL) {
errstr(_("cannot create tcp service.\n"));
exit(1);