39 |
|
* @throws IOException if something goes badly wrong |
40 |
|
*/ |
41 |
|
public TCPReaderInit(Socket socket, Queue queue) throws IOException { |
42 |
+ |
// set the Thread name |
43 |
+ |
setName("filter.TCPReaderInit"); |
44 |
+ |
|
45 |
|
_socket = socket; |
46 |
|
_queue = queue; |
47 |
|
// setup the reader & writer |
105 |
|
} |
106 |
|
|
107 |
|
String date = new Long(System.currentTimeMillis()/((long) 1000)).toString(); |
108 |
< |
String hostname = _socket.getInetAddress().getHostName(); |
108 |
> |
String hostname = _socket.getInetAddress().getHostName().toLowerCase(); |
109 |
|
String ipadd = _socket.getInetAddress().getHostAddress(); |
110 |
|
|
111 |
|
// run the service checks for this host |
119 |
|
_queue.add(xml); |
120 |
|
|
121 |
|
} catch (Exception e) { |
122 |
< |
_logger.write(toString(), Logger.ERROR, "ERROR: " + e.getMessage()); |
122 |
> |
_logger.write(toString(), Logger.ERROR, "ERROR: " + e); |
123 |
|
} |
124 |
|
|
125 |
|
// Disconnect streams & socket |