Changeset 583

Show
Ignore:
Timestamp:
05/13/07 22:52:26 (2 years ago)
Author:
chtekk
Message:

Helper methods done.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/vcd/methods/helper/helper_restart.c

    r534 r583  
    2222#include <lucid/log.h> 
    2323 
    24 /* helper.restart(string name) */ 
     24/* helper.restart(int xid) */ 
    2525xmlrpc_value *m_helper_restart(xmlrpc_env *env, xmlrpc_value *p, void *c) 
    2626{ 
  • trunk/src/vcd/methods/helper/helper_shutdown.c

    r534 r583  
    2626#include <lucid/log.h> 
    2727 
    28 /* helper.shutdown(string name) */ 
     28/* helper.shutdown(int xid) */ 
    2929xmlrpc_value *m_helper_shutdown(xmlrpc_env *env, xmlrpc_value *p, void *c) 
    3030{ 
     
    5858        rc = vxdb_prepare(&dbr, "SELECT timeout FROM init WHERE xid = %d", xid); 
    5959 
    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); 
    6362 
    64                 vxdb_finalize(dbr); 
    65         } 
     63        vxdb_finalize(dbr); 
    6664 
    6765        timeout = timeout < 1 ? 15 : timeout; 
     
    9997 
    10098                while (n++ < timeout) { 
     99                        sleep(1); 
     100 
    101101                        if (vx_info(xid, NULL) == -1) { 
    102102                                if (errno == ESRCH)