summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBastian Wissler2009-05-19 20:18:17 +0200
committerBastian Wissler2009-05-19 20:18:17 +0200
commit2bf864a989379960c1d9b69c44955d269d864658 (patch)
tree5c746b83a5d4b362a36706f0e63659cd32a44fc5
parentvmchooser binary: (diff)
downloadvmchooser-2bf864a989379960c1d9b69c44955d269d864658.tar.gz
vmchooser-2bf864a989379960c1d9b69c44955d269d864658.tar.xz
vmchooser-2bf864a989379960c1d9b69c44955d269d864658.zip
vmchooser update:
* Added support for the "active" parameter -> if in xml file something is not equal <active param="true".* the entry is discarded (only if "active" node is available) git-svn-id: http://svn.openslx.org/svn/openslx/openslx-src-tools/vmchooser/trunk@2859 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r--vmchooser/Makefile2
-rw-r--r--vmchooser/readXmlDir.cxx4
2 files changed, 5 insertions, 1 deletions
diff --git a/vmchooser/Makefile b/vmchooser/Makefile
index 4531c8f..a44aa19 100644
--- a/vmchooser/Makefile
+++ b/vmchooser/Makefile
@@ -8,7 +8,7 @@ CC = g++
DEBUG_CCFLAGS = -O0 -Wall -I/usr/include -I../fltk/ -I. -I../libxml2/include -ggdb #-ggdb #-Werror
CCFLAGS = -O2 -Wall -I/usr/include -I../fltk/ -I. -I../libxml2/include/
LDFLAGS = -L/usr/lib
-LIBS = -lpng ../fltk/lib/libfltk2_images.a -ljpeg -lz -lXi -lXinerama -lpthread -lm -lXext -lsupc++ -lXrender -lfontconfig -lXft -lXdmcp -lXau -ldl -lz -lfreetype -lX11 ../libxml2/libs/libxml2.a ../fltk/lib/libfltk2.a /usr/lib/libboost_regex-s.a /usr/lib/libboost_filesystem-s.a
+LIBS = -lpng ../fltk/lib/libfltk2_images.a -ljpeg -lz -lXi -lXinerama -lpthread -lm -lXext -lsupc++ -lXrender -lfontconfig -lXft -lXdmcp -lXau -ldl -lz -lfreetype -lX11 ../libxml2/libs/libxml2.a ../fltk/lib/libfltk2.a /usr/lib/libboost_regex-s.a /usr/lib/libboost_filesystem-s.a /usr/lib/libboost_system-s.a
.PHONY: all clean distclean
all:: ${TARGET}
diff --git a/vmchooser/readXmlDir.cxx b/vmchooser/readXmlDir.cxx
index 8e0e00c..b275ea6 100644
--- a/vmchooser/readXmlDir.cxx
+++ b/vmchooser/readXmlDir.cxx
@@ -185,6 +185,10 @@ DataEntry* get_entry(xmlDoc * doc)
tempc = getAttribute(doc,(char *) "active");
if (tempc != NULL ) {
de->active = (strstr(tempc,"true")!= NULL?true:false);
+ if(de->active == false) {
+ delete de;
+ return NULL;
+ }
}
tempc = NULL;