|   | 
      | 
  
  
      | 
      | 
  
 
     | 
    | 
  
  
     | 
    | 
  
  
    |   | 
      | 
  
  
    | 
         
xen-changelog
[Xen-changelog] [xen-unstable] Limit the number of opened	transactions p
 
# 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 <=
  
 |  
  
 | 
    | 
  
  
    |   | 
    |