diff --git a/src/servers/net/Jamfile b/src/servers/net/Jamfile index 42a5eae288..ddc948e077 100644 --- a/src/servers/net/Jamfile +++ b/src/servers/net/Jamfile @@ -1,6 +1,6 @@ SubDir HAIKU_TOP src servers net ; -UsePrivateHeaders net ; +UsePrivateHeaders app net ; #UseHeaders [ FDirName $(HAIKU_TOP) src add-ons kernel network ppp shared libppp headers ] ; #UseHeaders [ FDirName $(HAIKU_TOP) src add-ons kernel network ppp shared libkernelppp headers ] ; @@ -14,13 +14,8 @@ Server net_server : AutoconfigLooper.cpp DHCPClient.cpp Services.cpp -; - -LinkAgainst net_server : - be - libnetwork.so - $(TARGET_LIBSTDC++) + : be libnetwork.so $(TARGET_LIBSTDC++) # for PPP #libppp.a ; diff --git a/src/servers/net/NetServer.cpp b/src/servers/net/NetServer.cpp index 6337932b55..5569b77694 100644 --- a/src/servers/net/NetServer.cpp +++ b/src/servers/net/NetServer.cpp @@ -13,11 +13,11 @@ #include "Settings.h" #include -#include #include #include #include #include +#include #include #include @@ -39,9 +39,9 @@ typedef std::map LooperMap; -class NetServer : public BApplication { +class NetServer : public BServer { public: - NetServer(); + NetServer(status_t& status); virtual void AboutRequested(); virtual void ReadyToRun(); @@ -235,8 +235,8 @@ get_mac_address(const char* device, uint8* address) // #pragma mark - -NetServer::NetServer() - : BApplication("application/x-vnd.haiku-net_server") +NetServer::NetServer(status_t& error) + : BServer("application/x-vnd.haiku-net_server", false, &error) { } @@ -883,9 +883,15 @@ NetServer::_StartServices() int main() { - NetServer app; - app.Run(); + status_t status; + NetServer server(status); + if (status != B_OK) { + fprintf(stderr, "net_server: Failed to create application: %s\n", + strerror(status)); + return 1; + } + server.Run(); return 0; }