[haiku-commits] haiku: hrev46389 - src/kits/network/libnetapi headers/private/net

  • From: stefano.ceccherini@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 18 Nov 2013 20:02:55 +0100 (CET)

hrev46389 adds 1 changeset to branch 'master'
old head: fc51be0a4ebb316271f4901aed949f2f6c38f62d
new head: 0bc615438a8914183d02f7941b60cf025ff2a110
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=0bc6154+%5Efc51be0

----------------------------------------------------------------------------

0bc6154: Style fixes.
  Style fixes pointed out by Axel. I'm rusty, and it shows.
  Hope I got it right.
  Also moved get_route() into BPrivate.

                       [ Stefano Ceccherini <stefano.ceccherini@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev46389
Commit:      0bc615438a8914183d02f7941b60cf025ff2a110
URL:         http://cgit.haiku-os.org/haiku/commit/?id=0bc6154
Author:      Stefano Ceccherini <stefano.ceccherini@xxxxxxxxx>
Date:        Mon Nov 18 18:53:39 2013 UTC

----------------------------------------------------------------------------

4 files changed, 19 insertions(+), 3 deletions(-)
headers/private/net/RouteSupport.h              | 10 +++++++++-
src/kits/network/libnetapi/NetworkInterface.cpp |  2 +-
src/kits/network/libnetapi/NetworkRoster.cpp    |  2 +-
src/kits/network/libnetapi/RouteSupport.cpp     |  8 ++++++++

----------------------------------------------------------------------------

diff --git a/headers/private/net/RouteSupport.h 
b/headers/private/net/RouteSupport.h
index b40c518..7c8e524 100644
--- a/headers/private/net/RouteSupport.h
+++ b/headers/private/net/RouteSupport.h
@@ -2,13 +2,21 @@
  * Copyright 2013, Haiku, Inc. All Rights Reserved.
  * Distributed under the terms of the MIT License.
  */
-
 #ifndef ROUTESUPPORT_H_
 #define ROUTESUPPORT_H_
 
+
 #include <ObjectList.h>
 
+
+namespace BPrivate {
+
+
 status_t get_routes(const char* interfaceName,
                int family, BObjectList<route_entry>& routes);
 
+
+}
+
+
 #endif /* __ROUTESUPPORT_H_ */
diff --git a/src/kits/network/libnetapi/NetworkInterface.cpp 
b/src/kits/network/libnetapi/NetworkInterface.cpp
index 51614ec..95b41f1 100644
--- a/src/kits/network/libnetapi/NetworkInterface.cpp
+++ b/src/kits/network/libnetapi/NetworkInterface.cpp
@@ -569,7 +569,7 @@ BNetworkInterface::RemoveDefaultRoute(int family)
 status_t
 BNetworkInterface::GetRoutes(int family, BObjectList<route_entry>& routes) 
const
 {
-       return get_routes(Name(), family, routes);
+       return BPrivate::get_routes(Name(), family, routes);
 }
 
 
diff --git a/src/kits/network/libnetapi/NetworkRoster.cpp 
b/src/kits/network/libnetapi/NetworkRoster.cpp
index cc23d64..0e969d3 100644
--- a/src/kits/network/libnetapi/NetworkRoster.cpp
+++ b/src/kits/network/libnetapi/NetworkRoster.cpp
@@ -166,7 +166,7 @@ BNetworkRoster::RemoveInterface(const BNetworkInterface& 
interface)
 status_t
 BNetworkRoster::GetRoutes(int family, BObjectList<route_entry>& routes) const
 {
-       return get_routes(NULL, family, routes);
+       return BPrivate::get_routes(NULL, family, routes);
 }
 
 
diff --git a/src/kits/network/libnetapi/RouteSupport.cpp 
b/src/kits/network/libnetapi/RouteSupport.cpp
index 85c2fd3..291097c 100644
--- a/src/kits/network/libnetapi/RouteSupport.cpp
+++ b/src/kits/network/libnetapi/RouteSupport.cpp
@@ -3,6 +3,7 @@
  * Distributed under the terms of the MIT License.
  */
 
+
 #include <errno.h>
 #include <net/if.h>
 #include <sys/sockio.h>
@@ -11,6 +12,10 @@
 #include <ObjectList.h>
 #include <RouteSupport.h>
 
+
+namespace BPrivate {
+
+
 status_t
 get_routes(const char* interfaceName, int family, BObjectList<route_entry>& 
routes)
 {
@@ -72,3 +77,6 @@ get_routes(const char* interfaceName, int family, 
BObjectList<route_entry>& rout
 
        return B_OK;
 }
+
+
+}


Other related posts:

  • » [haiku-commits] haiku: hrev46389 - src/kits/network/libnetapi headers/private/net - stefano . ceccherini