diff options
Diffstat (limited to 'ACE/tests/SOCK_Netlink_Test.cpp')
-rw-r--r-- | ACE/tests/SOCK_Netlink_Test.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/ACE/tests/SOCK_Netlink_Test.cpp b/ACE/tests/SOCK_Netlink_Test.cpp index 65ffdf697cb..0acd75637d6 100644 --- a/ACE/tests/SOCK_Netlink_Test.cpp +++ b/ACE/tests/SOCK_Netlink_Test.cpp @@ -210,11 +210,13 @@ public: // Destructor virtual ~Secondary_Ipaddr_Handler (void); + //FUZZ: disable check_for_lack_ACE_OS // Initialization. Schedules a timer to run start the business. // int open (ACE_Reactor *const reactor, char* const ip_slash_mask, const char *const if_name); + //FUZZ: enable check_for_lack_ACE_OS // Returns reference to netlink socket. Necessary for reactor. virtual ACE_HANDLE get_handle (void) const; @@ -264,11 +266,13 @@ public: protected: + //FUZZ: disable check_for_lack_ACE_OS // De-registers the handler from the reactor, // other cleanup jobs virtual int close (); ACE_SOCK_Netlink& socket (); + //FUZZ: enable check_for_lack_ACE_OS private: @@ -382,10 +386,12 @@ Secondary_Ipaddr_Handler::open (ACE_Reactor *const reactor, if (this->socket ().open (this->address_, ACE_PROTOCOL_FAMILY_NETLINK, NETLINK_ROUTE) == -1) + //FUZZ: disable check_for_lack_ACE_OS ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT("(%P|%t) Secondary_Ipaddr_Handler::open: - failed \n") ACE_TEXT("to initialize netlink socket bu open (). \n")), -1); + //FUZZ: enable check_for_lack_ACE_OS // register with the reactor for input if (this->reactor ()->register_handler (this, @@ -403,7 +409,7 @@ Secondary_Ipaddr_Handler::open (ACE_Reactor *const reactor, ACE_TEXT("can't schedule timer with reactor.\n")), -1); - this->seq_ = time (0); + this->seq_ = ACE_OS::time (0); ACE_OS::strncpy (this->ip_buff_, ip_slash_mask, @@ -499,7 +505,7 @@ Secondary_Ipaddr_Handler::handle_input (ACE_HANDLE) ACE_TEXT("(%P) Secondary_Ipaddr_Handler::handle_input - command informs about error \n"))); // some error message - perror("rtnetlink error message: "); + ACE_OS::perror("rtnetlink error message: "); return 0; } @@ -661,7 +667,7 @@ Secondary_Ipaddr_Handler::fill_inet_prefix ( else *dot = '\0'; } - int num = atoi (to_search); + int num = ACE_OS::atoi (to_search); if (num < 0 || num > 255) return -1; else @@ -789,7 +795,7 @@ Secondary_Ipaddr_Handler::init_netlink_request ( if (get_if_index (if_name, interface_index) == -1 || interface_index < 0) { - fprintf (stderr, "get_if_index () - failed\n"); + ACE_OS::fprintf (stderr, "get_if_index () - failed\n"); return -1; } net_req.ifa_.ifa_index = interface_index; @@ -799,7 +805,7 @@ Secondary_Ipaddr_Handler::init_netlink_request ( if (fill_inet_prefix (local_prefix, ip_slash_netmask) == -1) { - fprintf (stderr, "fill_inet_prefix () - failed\n"); + ACE_OS::fprintf (stderr, "fill_inet_prefix () - failed\n"); return -1; } @@ -914,7 +920,7 @@ run_main (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("SOCK_Netlink_Test")); - if (::geteuid ()) + if (ACE_OS::geteuid ()) { ACE_DEBUG ((LM_INFO, ACE_TEXT ("Process has no superuser priveleges. ") |