Don't unbind port when event channel binding fails.

This happens when xend tries to introduce the same domain twice.
Signed-off-by: Rusty Russel <rusty@rustcorp.com.au>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
This commit is contained in:
cl349@firebug.cl.cam.ac.uk committed 2005-07-28 12:33:53 +00:00
1 parent 107f383ae1
commit 0c4fa371ca
1 file changed
+3 -2
+3 -2
View File
@@ -261,8 +261,8 @@ static struct domain *new_domain(void *context, domid_t domid,
{
struct domain *domain;
domain = talloc(context, struct domain);
domain->port = 0;
domain->domid = domid;
domain->port = port;
domain->path = talloc_strdup(domain, path);
domain->page = xc_map_foreign_range(*xc_handle, domain->domid,
getpagesize(),
@@ -279,9 +279,10 @@ static struct domain *new_domain(void *context, domid_t domid,
domain->output = domain->page + getpagesize()/2;
/* Tell kernel we're interested in this event. */
if (ioctl(eventchn_fd, EVENTCHN_BIND, domain->port) != 0)
if (ioctl(eventchn_fd, EVENTCHN_BIND, port) != 0)
return NULL;
domain->port = port;
domain->conn = new_connection(writechn, readchn);
domain->conn->domain = domain;
return domain;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.