Update of /cvsroot/dhcp-agent/dhcp-agent/src
In directory sc8-pr-cvs1:/tmp/cvs-serv5184/src
Modified Files:
dhcp-server.c dhcp-server.h
Log Message:
server now reads configuration first, before exiting
Index: dhcp-server.c
===================================================================
RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-server.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** dhcp-server.c 20 Jul 2003 05:52:31 -0000 1.9
--- dhcp-server.c 26 Jul 2003 23:48:01 -0000 1.10
***************
*** 97,104 ****
--- 97,110 ----
static void do_server(char *interface)
{
+ server_conf_t *server_conf;
dhcp_server_control_t *dhcp_server_control;
INFO_MESSAGE("DHCP server starting");
+ /* read configuration information. */
+ if((server_conf = server_conf_create(interface)) == NULL) {
+ FATAL_MESSAGE("error reading configuration file");
+ }
+
/* we go into the background immediately. */
if(want_background) {
***************
*** 110,114 ****
}
! dhcp_server_control = dhcp_server_control_create(interface);
if(file_create_pid(interface)) {
--- 116,120 ----
}
! dhcp_server_control = dhcp_server_control_create(interface, server_conf);
if(file_create_pid(interface)) {
Index: dhcp-server.h
===================================================================
RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-server.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** dhcp-server.h 20 Jul 2003 05:52:31 -0000 1.6
--- dhcp-server.h 26 Jul 2003 23:48:01 -0000 1.7
***************
*** 47,51 ****
/* prototypes. */
! extern dhcp_server_control_t *dhcp_server_control_create(const char *interface);
extern void dhcp_server_control_destroy(dhcp_server_control_t *sc);
--- 47,51 ----
/* prototypes. */
! extern dhcp_server_control_t *dhcp_server_control_create(const char *interface, server_conf_t *server_conf);
extern void dhcp_server_control_destroy(dhcp_server_control_t *sc);
|