[Dhcp-agent-commits] CVS: dhcp-agent dhcp-client.c,1.16,1.17
Status: Alpha
Brought to you by:
actmodern
From: Thamer Al-H. <act...@us...> - 2002-05-18 17:50:52
|
Update of /cvsroot/dhcp-agent/dhcp-agent In directory usw-pr-cvs1:/tmp/cvs-serv31911 Modified Files: dhcp-client.c Log Message: fixed bug when trying to kill running client Index: dhcp-client.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-client.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** dhcp-client.c 16 Feb 2002 17:54:33 -0000 1.16 --- dhcp-client.c 18 May 2002 17:50:49 -0000 1.17 *************** *** 36,42 **** if(dc) { /* only do clean up if we can. */ client_release(dc); ! if(interface_down(dc->interface_control)) ! error_message("warning: could not bring interface down."); ! delete_pid_file(dc->interface); } --- 36,40 ---- if(dc) { /* only do clean up if we can. */ client_release(dc); ! destroy_dhcp_client_control(dc); delete_pid_file(dc->interface); } *************** *** 93,96 **** --- 91,97 ---- do_shutdown(dc); + /* if we're only running to be setup, + * return here. */ + if(have_setup && only_setup) { return state; *************** *** 146,149 **** --- 147,151 ---- error_message("could not send signal to dhcpclient process."); error_message("maybe it's not running?"); + return; } *************** *** 180,184 **** if(!get_pid_file(interface, &pid)) { /* A race condition exists between the discover and request state. ! * So we can't hup the client and tell it the cache has been deleted. */ error_message("dhcpclient already running."); error_message("i won't delete cache until it's shutdown."); --- 182,186 ---- if(!get_pid_file(interface, &pid)) { /* A race condition exists between the discover and request state. ! * And we can't hup the client and tell it the cache has been deleted. */ error_message("dhcpclient already running."); error_message("i won't delete cache until it's shutdown."); *************** *** 186,193 **** } ! /* As long as no client is being run we can go ahead and delete the cache. ! * We need a client cache structure though, pass it a dummy structure ! * with the interface. That's all it needs. ! * (this is the hack). */ --- 188,195 ---- } ! /* As long as no client is running we can go ahead and delete ! * the cache. We need a client cache structure though, pass ! * it a dummy structure with the interface. That's all it ! * needs. (this is the hack). */ *************** *** 290,295 **** } } ! info_message("(C) 2001 Thamer Al-Harbash <tm...@wh...>"); info_message("starting for interface %s", interface); --- 292,299 ---- } } ! info_message("(C) 2001 Thamer Al-Harbash <tm...@wh...>"); + info_message("See LICENSE file for details."); + info_message(" "); info_message("starting for interface %s", interface); *************** *** 336,339 **** --- 340,348 ---- * */ + + /* "and she came from a great Desktop; and she razed the + * posers leaving a blanket of ash; and we were Praised in + * our Judgements;" -- from the Book of Ada (blessed be her + * semicolons) */ setup_interrupt_handlers(); /* setup signal handling */ |