File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -293,13 +293,13 @@ ip_representation::ip_representation(const struct sockaddr* ip)
293293 pieces[i/2 ] = ((u_char*)&(((struct sockaddr_in6 *)ip)->sin6_addr ))[i] + 16 * ((u_char*)&(((struct sockaddr_in6 *)ip)->sin6_addr ))[i+1 ];
294294 }
295295 }
296- mask = 65535 ;
296+ mask = DEFAULT_MASK_VALUE ;
297297}
298298
299299ip_representation::ip_representation (const std::string& ip)
300300{
301301 std::vector<std::string> parts;
302- mask = 65535 ;
302+ mask = DEFAULT_MASK_VALUE ;
303303 std::fill (pieces, pieces + 16 , 0 );
304304 if (ip.find (' :' ) != std::string::npos) // IPV6
305305 {
Original file line number Diff line number Diff line change 3131#include < gnutls/gnutls.h>
3232#endif
3333
34+ #define DEFAULT_MASK_VALUE 65535
35+
3436namespace httpserver {
3537namespace http {
3638
@@ -275,7 +277,7 @@ struct ip_representation
275277
276278 ip_representation (HttpUtils::IPVersion_T ip_version) : ip_version(ip_version)
277279 {
278- mask = 65535 ;
280+ mask = DEFAULT_MASK_VALUE ;
279281 std::fill (pieces, pieces + 16 , 0 );
280282 }
281283
You can’t perform that action at this time.
0 commit comments