Index: /trunk/zoo-project/zoo-kernel/Makefile.in
===================================================================
--- /trunk/zoo-project/zoo-kernel/Makefile.in	(revision 652)
+++ /trunk/zoo-project/zoo-kernel/Makefile.in	(revision 653)
@@ -107,8 +107,8 @@
 	install -d ${CGI_DIR}
 	install zoo_loader.cgi ${CGI_DIR}/
-	install libzoo_service.${EXT} ${DESTDIR}${INST_LIB}/libzoo_service.${VERSION}.${REVISION}.${EXT}
+	install libzoo_service.${EXT} ${DESTDIR}${INST_LIB}/${LIBZOO_SERVICE}
 	(cd ${DESTDIR}${INST_LIB} ; \
 	 if [ -e "libzoo_service.${EXT}" ]; then rm  libzoo_service.${EXT}; fi ; \
-	 ln -s libzoo_service.${VERSION}.${REVISION}.${EXT} libzoo_service.${EXT})
+	 ln -s ${LIBZOO_SERVICE} libzoo_service.${EXT})
 	install -d ${DESTDIR}${INST_INCLUDE}/zoo
 	install service.h service_internal.h ${DESTDIR}${INST_INCLUDE}/zoo
Index: /trunk/zoo-project/zoo-kernel/ZOOMakefile.opts.in
===================================================================
--- /trunk/zoo-project/zoo-kernel/ZOOMakefile.opts.in	(revision 652)
+++ /trunk/zoo-project/zoo-kernel/ZOOMakefile.opts.in	(revision 653)
@@ -15,4 +15,7 @@
 	EXT=dylib
 	DEFAULT_OPTS=-Wl,-compatibility_version,${VERSION},-current_version,${VERSION},-install_name,${DESTDIR}${INST_LIB}/libzoo_service.${VERSION}.${REVISION}.dylib
+	LIBZOO_SERVICE=libzoo_service.${VERSION}.${REVISION}.${EXT}
+else
+	LIBZOO_SERVICE=libzoo_service.${EXT}.${VERSION}
 endif
 
Index: /trunk/zoo-project/zoo-kernel/server_internal.c
===================================================================
--- /trunk/zoo-project/zoo-kernel/server_internal.c	(revision 652)
+++ /trunk/zoo-project/zoo-kernel/server_internal.c	(revision 653)
@@ -31,4 +31,10 @@
 #include <uuid/uuid.h>
 
+/**
+ * Detect WPS version used (1.0.0 or 2.0.0).
+ *
+ * @param version number as char* (1.0.0 or 2.0.0)
+ * @return 0 in case of version 1.0.0, 1 for 2.0.0, -1 in other case
+ */
 int getVersionId(const char* version){
   int schemaId=0;
@@ -37,5 +43,5 @@
       return schemaId;
   }
-  return 0;
+  return -1;
 }
 
@@ -51,5 +57,5 @@
   uuid_t uuid;
   uuid_generate_time(uuid);
-  char * rest;
+  char rest[128];
   uuid_unparse(uuid,rest);
   sprintf(res,"%s", rest);
Index: /trunk/zoo-project/zoo-kernel/service_internal.c
===================================================================
--- /trunk/zoo-project/zoo-kernel/service_internal.c	(revision 652)
+++ /trunk/zoo-project/zoo-kernel/service_internal.c	(revision 653)
@@ -57,12 +57,14 @@
   FILE* f0 = fopen (fbkpid, "r");
   if(f0!=NULL){
+    long flen;
+    char *fcontent;
     fseek (f0, 0, SEEK_END);
-    long flen = ftell (f0);
+    flen = ftell (f0);
     fseek (f0, 0, SEEK_SET);
-    char *tmps1 = (char *) malloc ((flen + 1) * sizeof (char));
-    fread(tmps1,flen,1,f0);
-    tmps1[flen]=0;
+    fcontent = (char *) malloc ((flen + 1) * sizeof (char));
+    fread(fcontent,flen,1,f0);
+    fcontent[flen]=0;
     fclose(f0);
-    return tmps1;
+    return fcontent;
   }else
     return NULL;
@@ -188,18 +190,22 @@
   FILE* f0 = fopen (fbkpid, "r");
   if(f0!=NULL){
-    char* stat=getStatusId(conf,lid);
+    semid lockid;
+    char* stat;
+    long flen;
+    stat=getStatusId(conf,lid);
     if(stat!=NULL){
       setMapInMaps(conf,"lenv","lid",stat);
-      semid lockid=acquireLock(conf);
+      lockid=acquireLock(conf);
       if(lockid<0)
 	return NULL;
     }
     fseek (f0, 0, SEEK_END);
-    long flen = ftell (f0);
+    flen = ftell (f0);
     if(flen>0){
+      char *fcontent;
       fseek (f0, 0, SEEK_SET);
-      char *tmps1 = (char *) malloc ((flen + 1) * sizeof (char));
-      fread(tmps1,flen,1,f0);
-      tmps1[flen]=0;
+      fcontent = (char *) malloc ((flen + 1) * sizeof (char));
+      fread(fcontent,flen,1,f0);
+      fcontent[flen]=0;
       fclose(f0);
       free(fbkpid);
@@ -208,5 +214,5 @@
 	free(stat);
       }
-      return tmps1;
+      return fcontent;
     }
     fclose(f0);
Index: /trunk/zoo-project/zoo-kernel/service_internal_saga.c
===================================================================
--- /trunk/zoo-project/zoo-kernel/service_internal_saga.c	(revision 652)
+++ /trunk/zoo-project/zoo-kernel/service_internal_saga.c	(revision 653)
@@ -138,4 +138,6 @@
     case CALLBACK_DLG_CONTINUE:
     case CALLBACK_PROCESS_SET_READY:
+    case CALLBACK_PROCESS_GET_OKAY:
+      return res;
       break;
 
@@ -145,10 +147,7 @@
 	if( cPercent != status ){
 	  status=cPercent;
-	}
-      }
-      break;
-
-    case CALLBACK_PROCESS_GET_OKAY:
-      status=1;
+	}else
+	  return res;
+      }
       break;
 
@@ -178,4 +177,5 @@
       else
 	res = 0;
+      return res;
       break;
 
Index: /trunk/zoo-project/zoo-kernel/sqlapi.h
===================================================================
--- /trunk/zoo-project/zoo-kernel/sqlapi.h	(revision 652)
+++ /trunk/zoo-project/zoo-kernel/sqlapi.h	(revision 653)
@@ -38,5 +38,5 @@
   void recordStoredFile(maps*,const char*,const char*,const char*);
   void recordServiceStatus(maps*);
-  void recordResponse(maps*,char*,bool);
+  void recordResponse(maps*,char*);
 #endif
 
