From 43efba9585a62837869a2f3500481f6d5713244a Mon Sep 17 00:00:00 2001 From: "Carlos Martin and Ruben S. Montero" Date: Wed, 28 Apr 2010 18:50:27 +0200 Subject: [PATCH] bug: Fix return code checks in RM --- src/rm/RequestManagerHostAllocate.cc | 2 +- src/rm/RequestManagerUserAllocate.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rm/RequestManagerHostAllocate.cc b/src/rm/RequestManagerHostAllocate.cc index 91fe3b8fd0..7d3393f4d0 100644 --- a/src/rm/RequestManagerHostAllocate.cc +++ b/src/rm/RequestManagerHostAllocate.cc @@ -62,7 +62,7 @@ void RequestManager::HostAllocate::execute( im_mad_name, vmm_mad_name, tm_mad_name); - if ( rc != 0 ) + if ( rc == -1 ) { goto error_host_allocate; } diff --git a/src/rm/RequestManagerUserAllocate.cc b/src/rm/RequestManagerUserAllocate.cc index 772a540017..63aa6d18af 100644 --- a/src/rm/RequestManagerUserAllocate.cc +++ b/src/rm/RequestManagerUserAllocate.cc @@ -67,7 +67,7 @@ void RequestManager::UserAllocate::execute( // Now let's add the user rc = UserAllocate::upool->allocate(&uid,username,password,true); - if ( rc != 0 ) + if ( rc == -1 ) { goto error_allocate; }