summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-07-22 09:34:29 +0200
committerStefan Metzmacher <metze@samba.org>2011-07-22 17:06:07 +0200
commitcd71c5746b7fb40349b13b6a3f80f85a7b1a4fa8 (patch)
treed2c64a054411d97dfaeb1655f3da397189a84a5e /source3/torture
parent5bd80b20a1e7d2ad2cd5c426f3729ed0ba96cbb1 (diff)
downloadsamba-cd71c5746b7fb40349b13b6a3f80f85a7b1a4fa8.tar.gz
samba-cd71c5746b7fb40349b13b6a3f80f85a7b1a4fa8.tar.bz2
samba-cd71c5746b7fb40349b13b6a3f80f85a7b1a4fa8.zip
s3:torture: use cli_state_disconnect() to close the socket on SIGALRM
metze
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/torture.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index fbfe52d83f..c197de98cb 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -2501,7 +2501,7 @@ fail:
*/
static bool got_alarm;
-static int alarm_fd;
+static struct cli_state *alarm_cli;
static void alarm_handler(int dummy)
{
@@ -2510,7 +2510,7 @@ static void alarm_handler(int dummy)
static void alarm_handler_parent(int dummy)
{
- close(alarm_fd);
+ cli_state_disconnect(alarm_cli);
}
static void do_local_lock(int read_fd, int write_fd)
@@ -2661,7 +2661,7 @@ static bool run_locktest9(int dummy)
}
/* Wait 20 seconds for the lock. */
- alarm_fd = cli1->fd;
+ alarm_cli = cli1;
CatchSignal(SIGALRM, alarm_handler_parent);
alarm(20);