summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/script/tests/SocketWrapper.pm14
1 files changed, 12 insertions, 2 deletions
diff --git a/source4/script/tests/SocketWrapper.pm b/source4/script/tests/SocketWrapper.pm
index 17c4457146..aa913d240e 100644
--- a/source4/script/tests/SocketWrapper.pm
+++ b/source4/script/tests/SocketWrapper.pm
@@ -35,8 +35,18 @@ sub setup_dir($$)
}
}
- $ENV{SOCKET_WRAPPER_PCAP_DIR} = $pcap_dir;
- $ENV{SOCKET_WRAPPER_DIR} = $dir;
+ if (defined($pcap_dir)) {
+ $ENV{SOCKET_WRAPPER_PCAP_DIR} = $pcap_dir;
+ } else {
+ delete $ENV{SOCKET_WRAPPER_PCAP_DIR};
+ }
+
+ if (defined($dir)) {
+ $ENV{SOCKET_WRAPPER_DIR} = $dir;
+ } else {
+ delete $ENV{SOCKET_WRAPPER_DIR};
+ }
+
return $dir;
}