1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-15 05:57:49 +03:00

Small, long overdue, fix for libsmbclient.

(This used to be commit 40aea3fe94b68ce284e2f21e57f086212936c049)
This commit is contained in:
Richard Sharpe 2002-09-22 16:22:48 +00:00
parent d06d2c876e
commit 8aaf8174bf

View File

@ -328,3 +328,22 @@ uint16 cli_setpid(struct cli_state *cli, uint16 pid)
cli->pid = pid;
return ret;
}
/****************************************************************************
Send a keepalive packet to the server
****************************************************************************/
BOOL cli_send_keepalive(struct cli_state *cli)
{
if (cli->fd == -1) {
DEBUG(3, ("cli_send_keepalive: fd == -1\n"));
return False;
}
if (!send_keepalive(cli->fd)) {
close(cli->fd);
cli->fd = -1;
DEBUG(0,("Error sending keepalive packet to client.\n"));
return False;
}
return True;
}