Changeset 583
- Timestamp:
- 05/13/07 22:52:26 (2 years ago)
- Files:
-
- trunk/src/vcd/methods/helper/helper_restart.c (modified) (1 diff)
- trunk/src/vcd/methods/helper/helper_shutdown.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/vcd/methods/helper/helper_restart.c
r534 r583 22 22 #include <lucid/log.h> 23 23 24 /* helper.restart( string name) */24 /* helper.restart(int xid) */ 25 25 xmlrpc_value *m_helper_restart(xmlrpc_env *env, xmlrpc_value *p, void *c) 26 26 { trunk/src/vcd/methods/helper/helper_shutdown.c
r534 r583 26 26 #include <lucid/log.h> 27 27 28 /* helper.shutdown( string name) */28 /* helper.shutdown(int xid) */ 29 29 xmlrpc_value *m_helper_shutdown(xmlrpc_env *env, xmlrpc_value *p, void *c) 30 30 { … … 58 58 rc = vxdb_prepare(&dbr, "SELECT timeout FROM init WHERE xid = %d", xid); 59 59 60 if (rc == VXDB_OK) { 61 if (vxdb_step(dbr) == VXDB_ROW) 62 timeout = vxdb_column_int(dbr, 0); 60 if (rc == VXDB_OK && vxdb_step(dbr) == VXDB_ROW) 61 timeout = vxdb_column_int(dbr, 0); 63 62 64 vxdb_finalize(dbr); 65 } 63 vxdb_finalize(dbr); 66 64 67 65 timeout = timeout < 1 ? 15 : timeout; … … 99 97 100 98 while (n++ < timeout) { 99 sleep(1); 100 101 101 if (vx_info(xid, NULL) == -1) { 102 102 if (errno == ESRCH)
