* give up immediately, to avoid the initial timeout.
*/
if (bg && we_saw_this_host_before(hostname)) {
- daemonized = daemonize(); /* parent or error */
+ daemonized = daemonize();
if (daemonized <= 0) { /* parent or error */
retval = -daemonized;
goto ret;
&msock, 0, 0);
break;
default:
- mclient = 0;
+ mclient = NULL;
}
if (!mclient) {
if (!daemonized && prevt == 0)
error_msg_rpc(clnt_sperror(mclient, " "));
auth_destroy(mclient->cl_auth);
clnt_destroy(mclient);
- mclient = 0;
+ mclient = NULL;
close(msock);
+ msock = -1;
}
/* Timeout. We are going to retry... maybe */
auth_destroy(mclient->cl_auth);
clnt_destroy(mclient);
close(msock);
+ msock = -1;
if (bg) {
/* We must wait until mount directory is available */
if (!daemonized) {
daemonized = daemonize();
if (daemonized <= 0) { /* parent or error */
+ // FIXME: parent doesn't close fsock - ??!
retval = -daemonized;
goto ret;
}
fail: /* abort */
- if (msock != -1) {
+ if (msock >= 0) {
if (mclient) {
auth_destroy(mclient->cl_auth);
clnt_destroy(mclient);
}
close(msock);
}
- if (fsock != -1)
+ if (fsock >= 0)
close(fsock);
ret: