diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2012-11-14 09:06:29 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-11-14 09:06:29 +0100 |
commit | d23d8dc6ecedffdada63f6aa2ffa8554e4af0115 (patch) | |
tree | f5aa7c66ae8b10e0230f9826ec4efef8ecd2ba50 | |
parent | 34889bb7ab5674df21fdba3d5f913c99707f1a42 (diff) | |
download | vconsole-d23d8dc6ecedffdada63f6aa2ffa8554e4af0115.tar.gz |
start paused, unpause after connect
-rw-r--r-- | domain.c | 8 | ||||
-rw-r--r-- | vconsole.h | 1 |
2 files changed, 8 insertions, 1 deletions
@@ -359,7 +359,8 @@ void domain_start(struct vconsole_domain *dom) domain_update_info(dom, d); switch (dom->info.state) { case VIR_DOMAIN_SHUTOFF: - virDomainCreate(d); + virDomainCreateWithFlags(d, VIR_DOMAIN_START_PAUSED); + dom->unpause = TRUE; break; case VIR_DOMAIN_PAUSED: virDomainResume(d); @@ -543,6 +544,11 @@ void domain_update(struct vconsole_connect *conn, /* update tree store cols */ domain_update_tree_store(dom, &guest); + + if (dom->unpause && dom->info.state == VIR_DOMAIN_PAUSED) { + virDomainResume(d); + dom->unpause = FALSE; + } } void domain_update_all(struct vconsole_window *win) @@ -105,6 +105,7 @@ struct vconsole_domain { virStreamPtr stream; virDomainInfo info; gboolean saved; + gboolean unpause; struct timeval ts; struct timeval last_ts; |