(propagate_database): on any failure, drop the connection to the peer
and try next one. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20268 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -694,7 +694,7 @@ propagate_database (krb5_context context, int type,
|
|||||||
failed++;
|
failed++;
|
||||||
krb5_warn(context, ret, "krb5_sendauth (%s)", host);
|
krb5_warn(context, ret, "krb5_sendauth (%s)", host);
|
||||||
close(fd);
|
close(fd);
|
||||||
continue;
|
goto next_host;
|
||||||
}
|
}
|
||||||
|
|
||||||
pd.context = context;
|
pd.context = context;
|
||||||
@@ -705,6 +705,7 @@ propagate_database (krb5_context context, int type,
|
|||||||
if (ret) {
|
if (ret) {
|
||||||
krb5_warnx(context, "iterate to host %s failed", host);
|
krb5_warnx(context, "iterate to host %s failed", host);
|
||||||
failed++;
|
failed++;
|
||||||
|
goto next_host;
|
||||||
}
|
}
|
||||||
|
|
||||||
krb5_data_zero (&data);
|
krb5_data_zero (&data);
|
||||||
@@ -712,15 +713,18 @@ propagate_database (krb5_context context, int type,
|
|||||||
if(ret) {
|
if(ret) {
|
||||||
krb5_warn(context, ret, "krb5_write_priv_message");
|
krb5_warn(context, ret, "krb5_write_priv_message");
|
||||||
failed++;
|
failed++;
|
||||||
|
goto next_host;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = krb5_read_priv_message(context, auth_context, &fd, &data);
|
ret = krb5_read_priv_message(context, auth_context, &fd, &data);
|
||||||
if(ret) {
|
if(ret) {
|
||||||
krb5_warn(context, ret, "krb5_read_priv_message: %s", host);
|
krb5_warn(context, ret, "krb5_read_priv_message: %s", host);
|
||||||
failed++;
|
failed++;
|
||||||
|
goto next_host;
|
||||||
} else
|
} else
|
||||||
krb5_data_free (&data);
|
krb5_data_free (&data);
|
||||||
|
|
||||||
|
next_host:
|
||||||
krb5_auth_con_free(context, auth_context);
|
krb5_auth_con_free(context, auth_context);
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user