From 41f2c94902cdac7baeb07244efc807dffcd68a07 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 24 Oct 2013 14:21:30 -0700 Subject: [PATCH] Client: limit # of slots to #CPUS*100. Also, consider an app verison a VM app if one of its files contains "vboxwrapper" --- client/app.cpp | 4 ++-- client/client_types.cpp | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/client/app.cpp b/client/app.cpp index 71fa2fcffd..1be4c6ed38 100644 --- a/client/app.cpp +++ b/client/app.cpp @@ -518,9 +518,9 @@ int ACTIVE_TASK::get_free_slot(RESULT* rp) { // paranoia - don't allow unbounded slots // - if (j > 1000) { + if (j > gstate.ncpus*100) { msg_printf(rp->project, MSG_INTERNAL_ERROR, - "exceeded limit of 1000 slot directories" + "exceeded limit of %d slot directories", gstate.ncpus*100 ); return ERR_NULL; } diff --git a/client/client_types.cpp b/client/client_types.cpp index 402b80e9af..2c1ef2a69b 100644 --- a/client/client_types.cpp +++ b/client/client_types.cpp @@ -794,8 +794,13 @@ int APP_VERSION::parse(XML_PARSER& xp) { } if (xp.parse_str("app_name", app_name, sizeof(app_name))) continue; if (xp.match_tag("file_ref")) { - file_ref.parse(xp); - app_files.push_back(file_ref); + int retval = file_ref.parse(xp); + if (!retval) { + if (strstr(file_ref.file_name, "vboxwrapper")) { + is_vm_app = true; + } + app_files.push_back(file_ref); + } continue; } if (xp.parse_int("version_num", version_num)) continue;