The net_server is now a BServer instead of a BApplication, IOW it doesn't rely on the

app_server being started anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19816 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2007-01-15 16:51:27 +00:00
parent c2f09ed5b7
commit bbaa26a490
2 changed files with 15 additions and 14 deletions

View File

@ -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
;

View File

@ -13,11 +13,11 @@
#include "Settings.h"
#include <Alert.h>
#include <Application.h>
#include <Directory.h>
#include <Entry.h>
#include <NodeMonitor.h>
#include <Path.h>
#include <Server.h>
#include <TextView.h>
#include <arpa/inet.h>
@ -39,9 +39,9 @@
typedef std::map<std::string, BLooper*> 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;
}