From 9c1dbad3fcf04c4c797437531031cfaefe28bfcf Mon Sep 17 00:00:00 2001
From: chenshijun <chenshijun@aiotlink.com>
Date: 星期二, 19 三月 2019 18:05:57 +0800
Subject: [PATCH] Merge branch 'yw.1.2.fixbug' of ssh://192.168.1.226:29418/development/c++ into yw.1.2.fixbug

---
 QiaoJiaSystem/FaceDetectServer/FaceDetectServerI.cpp |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/QiaoJiaSystem/FaceDetectServer/FaceDetectServerI.cpp b/QiaoJiaSystem/FaceDetectServer/FaceDetectServerI.cpp
index a52e916..0c42a6d 100644
--- a/QiaoJiaSystem/FaceDetectServer/FaceDetectServerI.cpp
+++ b/QiaoJiaSystem/FaceDetectServer/FaceDetectServerI.cpp
@@ -7,8 +7,8 @@
 #include <THFaceProperty_i.h>
 
 FaceDetectServerI::FaceDetectServerI() {
-    long threadMax = appPref.getLongData("thread.max");
-    long gpuIndex = appPref.getLongData("gpu.index");
+    long threadMax = appPref.getIntData("thread.max");
+    long gpuIndex = appPref.getIntData("gpu.index");
     for (int i = 0; i < threadMax; i++) {
         detectResourcesManager.pushResource(i);
     }
@@ -44,6 +44,7 @@
 FaceDetect::Faces FaceDetectServerI::faceDetect(Ice::Int width, Ice::Int height, const std::string &shareMemoryName,
                                                 const Ice::Current &) {
     ClockTimer ct("FaceDetectServerI::faceDetect");
+    INFO("Face Detect");
     FaceDetect::Faces faces;
     QSharedMemory shareMemory(QString(shareMemoryName.c_str()));
     if (shareMemory.attach()) {
@@ -72,6 +73,7 @@
 
 FaceDetect::ThftResult FaceDetectServerI::faceProperty(Ice::Int width, Ice::Int height, const FaceDetect::FacePos &pos,
                                                        const std::string &shareMemoryName, const Ice::Current &) {
+    INFO("faceProperty");
     QSharedMemory shareMemory(QString(shareMemoryName.c_str()));
     if (shareMemory.attach()) {
         FaceDetect::ThftResult thftResult;
@@ -88,6 +90,7 @@
         }
         return thftResult;
     } else {
-        throw std::runtime_error("shareMemory attach faild");
+        ERR("shareMemory error  " << shareMemoryName);
+//        throw std::runtime_error("shareMemory attach faild");
     }
 }

--
Gitblit v1.8.0