mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 19:08:58 +00:00
When binding to transports if getnetconfigent() fails then actually
print out the correct transport it failed on rather than always spitting out 'udp', also call nc_sperror() to give a more verbose error message detailing the problem.
This commit is contained in:
parent
17dfcdfaed
commit
5ed43a1e8e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=94404
@ -142,7 +142,8 @@ main(argc, argv)
|
|||||||
for (i = 0; i < maxindex; i++) {
|
for (i = 0; i < maxindex; i++) {
|
||||||
nconf = getnetconfigent(transports[i]);
|
nconf = getnetconfigent(transports[i]);
|
||||||
if (nconf == NULL)
|
if (nconf == NULL)
|
||||||
errx(1, "cannot get udp netconf.");
|
errx(1, "cannot get %s netconf: %s.", transports[i],
|
||||||
|
nc_sperror());
|
||||||
|
|
||||||
transp = svc_tli_create(RPC_ANYFD, nconf, NULL, 0, 0);
|
transp = svc_tli_create(RPC_ANYFD, nconf, NULL, 0, 0);
|
||||||
if (transp == NULL) {
|
if (transp == NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user