WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Limit the number of opened transactions p

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Limit the number of opened transactions per connection to 5.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 29 Jul 2006 14:30:17 +0000
Delivery-date: Sat, 29 Jul 2006 07:32:47 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User vhanquez@xxxxxxxxxxxxxxxxxxxxx
# Node ID d2bf1a7cc1319d2e0379c3394a6c09ec2f0c51e1
# Parent  edf7a25fdc4317b064373cf383eb2a52b295d56c
Limit the number of opened transactions per connection to 5.

Signed-off-by: Vincent Hanquez <vincent@xxxxxxxxxxxxx>
---
 tools/xenstore/xenstored_transaction.c |   10 ++++++++++
 1 files changed, 10 insertions(+)

diff -r edf7a25fdc43 -r d2bf1a7cc131 tools/xenstore/xenstored_transaction.c
--- a/tools/xenstore/xenstored_transaction.c    Sat Jul 29 13:06:41 2006 +0100
+++ b/tools/xenstore/xenstored_transaction.c    Sat Jul 29 14:05:59 2006 +0100
@@ -125,10 +125,20 @@ void do_transaction_start(struct connect
 {
        struct transaction *trans, *exists;
        char id_str[20];
+       int started;
 
        /* We don't support nested transactions. */
        if (conn->transaction) {
                send_error(conn, EBUSY);
+               return;
+       }
+
+       started = 0;
+       list_for_each_entry(trans, &conn->transaction_list, list)
+               started++;
+
+       if (started > 5) {
+               send_error(conn, ENOSPC);
                return;
        }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Limit the number of opened transactions per connection to 5., Xen patchbot-unstable <=