aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstore/xenstored_core.c
diff options
context:
space:
mode:
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>2006-03-23 14:32:15 +0100
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>2006-03-23 14:32:15 +0100
commit1bac3b49cdd459df9bd93f2997226ad535caaae2 (patch)
tree13c0960cfc15f2a7342fe4fce7c8ab0729b99a82 /tools/xenstore/xenstored_core.c
parent64444a69821e1c2d9cb1dff2152d45b4a24f665a (diff)
downloadxen-1bac3b49cdd459df9bd93f2997226ad535caaae2.tar.gz
xen-1bac3b49cdd459df9bd93f2997226ad535caaae2.tar.bz2
xen-1bac3b49cdd459df9bd93f2997226ad535caaae2.zip
Import the current version of talloc from the Samba 3 source base. This gives
us greater confidence that our talloc implementation is "known good". Remove the OOM handling from consider_message: talloc_set_fail_handler is no longer supported. Signed-off-by: Ewan Mellor <ewan@xensource.com>
Diffstat (limited to 'tools/xenstore/xenstored_core.c')
-rw-r--r--tools/xenstore/xenstored_core.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c
index afede2f454..6515b1b21e 100644
--- a/tools/xenstore/xenstored_core.c
+++ b/tools/xenstore/xenstored_core.c
@@ -1231,39 +1231,17 @@ static void process_message(struct connection *conn, struct buffered_data *in)
conn->transaction = NULL;
}
-static int out_of_mem(void *data)
-{
- longjmp(*(jmp_buf *)data, 1);
-}
-
static void consider_message(struct connection *conn)
{
- jmp_buf talloc_fail;
-
if (verbose)
xprintf("Got message %s len %i from %p\n",
sockmsg_string(conn->in->hdr.msg.type),
conn->in->hdr.msg.len, conn);
- /* For simplicity, we kill the connection on OOM. */
- talloc_set_fail_handler(out_of_mem, &talloc_fail);
- if (setjmp(talloc_fail)) {
- talloc_free(conn);
- goto end;
- }
-
process_message(conn, conn->in);
talloc_free(conn->in);
conn->in = new_buffer(conn);
-
-end:
- talloc_set_fail_handler(NULL, NULL);
- if (talloc_total_blocks(NULL)
- != talloc_total_blocks(talloc_autofree_context()) + 1) {
- talloc_report_full(NULL, stderr);
- abort();
- }
}
/* Errors in reading or allocating here mean we get out of sync, so we