| 311 |  | ) or return; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 312 |  | if (!defined $sock) { | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 313 |  | print "IHOST WARNING: Failed to deliver a heartbeat to the i-scream filter.\n"; | 
 
 
 
 
 
 
 
 | 314 | + | &tcp_configure(); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 315 |  | return; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 316 |  | } | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 317 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 325 |  | if (!$response eq "OK") { | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 326 |  | close($sock); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 327 |  | print "Server gave wrong response to HEARTBEAT: $response\n"; | 
 
 
 
 
 
 
 
 | 328 | + | &tcp_configure(); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 329 |  | return; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 330 |  | } | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 331 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 336 |  | if (!$response eq "OK") { | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 337 |  | close($sock); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 338 |  | print "Server gave wrong response to CONFIG: $response\n"; | 
 
 
 
 
 
 
 
 | 339 | + | &tcp_configure(); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 340 |  | return; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 341 |  | } | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 342 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 347 |  | if (!$response eq "OK") { | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 348 |  | close($sock); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 349 |  | print "Server gave wrong response to file list: $response\n"; | 
 
 
 
 
 
 
 
 | 350 | + | &tcp_configure(); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 351 |  | return; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 352 |  | } | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 353 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 357 |  | chop $response; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 358 |  | if ($response eq "ERROR") { | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 359 |  | close($sock); | 
 
 
 
 
 
 
 
 | 360 | + | print "Server configuration changed.  Reconfiguring with filter manager.\n"; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 361 |  | &tcp_configure(); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 362 |  | return; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 363 |  | } | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 364 |  | if (!$response eq "OK") { | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 365 |  | close($sock); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 366 |  | print "Server gave wrong response to HEARTBEAT: $response\n"; | 
 
 
 
 
 
 
 
 | 367 | + | &tcp_configure(); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 368 |  | return; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 369 |  | } | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 370 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 375 |  | if (!$response eq "OK") { | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 376 |  | close($sock); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 377 |  | print "Server gave wrong response to ENDHEARTBEAT: $response\n"; | 
 
 
 
 
 
 
 
 | 378 | + | &tcp_configure(); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 379 |  | return; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 380 |  | } | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 381 |  |  |