File tree Expand file tree Collapse file tree 3 files changed +4
-10
lines changed Expand file tree Collapse file tree 3 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ namespace log4cpp {
130130#else
131131int _socket;
132132#endif
133- struct in_addr * _ipAddr;
133+ in_addr_t _ipAddr;
134134 private:
135135 int _cludge;
136136 };
Original file line number Diff line number Diff line change 11<package >
22 <name >log4cpp</name >
3- <version >2.8.1 </version >
3+ <version >2.8.3 </version >
44 <description >
55 Log4cpp maintained by Orocos developers
66 This version of log4cpp deviates from the official release
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ namespace log4cpp {
111111 return ; // fail silently
112112 }
113113 }
114- _ipAddr = ( struct in_addr *) pent->h_addr ;
114+ _ipAddr = *( in_addr_t *)( pent->h_addr ); // fixed bug #1579890
115115 }
116116 // Get a datagram socket.
117117
@@ -143,14 +143,8 @@ namespace log4cpp {
143143 sockaddr_in sain;
144144 sain.sin_family = AF_INET;
145145 sain.sin_port = htons (_portNumber);
146-
147- if (_ipAddr == NULL )
148- {
149- return ; // Fail silently
150- }
151-
152146 // NO, do NOT use htonl on _ipAddr. Is already in network order.
153- sain.sin_addr .s_addr = _ipAddr-> s_addr ;
147+ sain.sin_addr .s_addr = _ipAddr;
154148
155149 while (messageLength > 0 ) {
156150 /* if packet larger than maximum (900 bytes), split
You can’t perform that action at this time.
0 commit comments