From b14414b4f03202eb6802e88b134d9c88e25642a7 Mon Sep 17 00:00:00 2001 From: xq2005 Date: Fri, 7 Jan 2011 08:58:46 +0000 Subject: [PATCH] improve the performance for submit_request git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8578 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-UI/lib/functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xCAT-UI/lib/functions.php b/xCAT-UI/lib/functions.php index 219483f9f..c74ffab0c 100644 --- a/xCAT-UI/lib/functions.php +++ b/xCAT-UI/lib/functions.php @@ -90,7 +90,8 @@ function submit_request($req, $skipVerify){ // Look for serverdone response $fullpattern = '/\s*\s*<\/serverdone>\s*<\/xcatresponse>/'; $mixedpattern = '/\s*<\/serverdone>.*<\/xcatresponse>/'; - if(preg_match($mixedpattern,$response)) { + $recentpattern = '/<\/xcatresponse>/'; + if(preg_match($recentpattern,$str) && preg_match($mixedpattern,$response)) { // Transaction is done, // Package up XML and return it // Remove the serverdone response and put an xcat tag around the rest