[dhcp-agent-commits] dhcp-agent/src dhcp-client-control.c,1.2,1.3 dhcp-client.c,1.3,1.4
Status: Alpha
Brought to you by:
actmodern
From: <act...@us...> - 2002-11-15 21:20:11
|
Update of /cvsroot/dhcp-agent/dhcp-agent/src In directory usw-pr-cvs1:/tmp/cvs-serv4939 Modified Files: dhcp-client-control.c dhcp-client.c Log Message: fix to interrupt handling Index: dhcp-client-control.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-client-control.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dhcp-client-control.c 10 Nov 2002 15:46:40 -0000 1.2 --- dhcp-client-control.c 15 Nov 2002 21:19:35 -0000 1.3 *************** *** 140,143 **** --- 140,144 ---- dc->conf = create_client_conf(dc->interface); dc->cache = create_client_cache(dc->interface); + dc->timer = create_timer(); if(load_client_conf(dc->conf) < 0) { *************** *** 237,240 **** --- 238,244 ---- if(dc->conf) client_conf_destroy(dc->conf); + + if(dc->timer) + destroy_timer(dc->timer); if(dc->interface) Index: dhcp-client.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-client.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** dhcp-client.c 15 Nov 2002 21:06:47 -0000 1.3 --- dhcp-client.c 15 Nov 2002 21:19:35 -0000 1.4 *************** *** 225,234 **** --- 225,239 ---- switch(got_interrupt_type()) { + case INTERRUPT_NONE: + break; + case INTERRUPT_TERM: state = STATE_DO_SHUTDOWN; + break; case INTERRUPT_HUP: /* for now shutdown. */ state = STATE_DO_SHUTDOWN; + break; case INTERRUPT_ALARM: *************** *** 238,246 **** case TIMER_IP_LEASE: state = STATE_DISCOVER_OFFER; case TIMER_REBIND: state = STATE_REQUEST_ACK; ! } } --- 243,256 ---- case TIMER_IP_LEASE: state = STATE_DISCOVER_OFFER; + break; case TIMER_REBIND: state = STATE_REQUEST_ACK; ! break; } + + + default: + FATAL_MESSAGE("invalid interrupt type caught. this is a bug. report me."); } |