summaryrefslogtreecommitdiff
path: root/source4/script
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-04-19 14:51:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:51:09 -0500
commit49f71c5c970e51a8918b3624e4f41d99751b4a2a (patch)
treeb8f8eee71b1ab22695bed55368bf4e035f0d4793 /source4/script
parent3c5618fb1b5cf484c528a7c957a5a9f260d75a4a (diff)
downloadsamba-49f71c5c970e51a8918b3624e4f41d99751b4a2a.tar.gz
samba-49f71c5c970e51a8918b3624e4f41d99751b4a2a.tar.bz2
samba-49f71c5c970e51a8918b3624e4f41d99751b4a2a.zip
r22374: fix perl warnings
metze (This used to be commit e8dd140a03eb8ee5f444551a05d313864801c50e)
Diffstat (limited to 'source4/script')
-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;
}