static void send_server_keepalive(void **private_data_pointer)
{
- struct cli_state **cli = (struct cli_state **)private_data_pointer;
-
/* also send a keepalive to the password server if its still
connected */
- if (cli && *cli && (*cli)->initialised) {
- if (!send_keepalive((*cli)->fd)) {
- DEBUG( 2, ( "password server keepalive failed.\n"));
- cli_shutdown(*cli);
+ if (private_data_pointer) {
+ struct cli_state *cli = (struct cli_state *)(*private_data_pointer);
+ if (cli && cli->initialised) {
+ if (!send_keepalive(cli->fd)) {
+ DEBUG( 2, ( "send_server_keepalive: password server keepalive failed.\n"));
+ cli_shutdown(cli);
+ *private_data_pointer = NULL;
+ }
}
}
}