151 |
|
|
152 |
|
print $sock "FILTER\n"; |
153 |
|
$response = <$sock>; |
154 |
+ |
unless (defined($response)) { |
155 |
+ |
print "Failed: Could not get a filter address from the filter manager.\n"; |
156 |
+ |
exit(1); |
157 |
+ |
} |
158 |
|
chop $response; |
159 |
|
$response =~ /(.*);(.*);(.*)/; |
160 |
|
($filter_addr, $udp_port, $tcp_port) = ($1, $2, $3); |
161 |
+ |
unless (defined($filter_addr) && defined($udp_port) && defined($tcp_port)) { |
162 |
+ |
print "Failed: Filter address response from server did not make sense: $response\n"; |
163 |
+ |
exit(1); |
164 |
+ |
} |
165 |
|
|
166 |
|
print "Got filter data ($filter_addr, $udp_port, $tcp_port)\n"; |
167 |
|
|