HGGitLab

Commit 9826a356 authored by luoliangyi's avatar luoliangyi

解决webservice在linux上的编译问题

parent ee966c60
......@@ -36,6 +36,7 @@
<Add directory="../../../../third_party/sane" />
<Add directory="../../../../release/include" />
<Add directory="../../../../third_party/libzip/uos/amd64/include" />
<Add directory="../../../../third_party/json" />
</Compiler>
<Linker>
<Add option="-L../../../../release/bin/uos/amd64" />
......@@ -63,6 +64,10 @@
<Unit filename="../../../../sdk/webservice/main.cpp" />
<Unit filename="../../../../third_party/base64/base64.cpp" />
<Unit filename="../../../../third_party/base64/base64.h" />
<Unit filename="../../../../third_party/json/cJSON.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="../../../../third_party/json/cJSON.h" />
<Unit filename="../../../../third_party/sha1/sha1.cpp" />
<Unit filename="../../../../third_party/sha1/sha1.h" />
<Extensions>
......
......@@ -166,7 +166,7 @@ bool Manager::GetDevNames(std::vector<std::string>& devNameList)
return true;
}
bool Manager::GetImageByDevId(const std::string& devId, std::vector<std::string>& imgNameList,
bool Manager::GetImageByDevId(const std::string& devId, std::vector<std::string>& imgNameList,
std::vector<std::string>& imgBase64List)
{
imgNameList.clear();
......@@ -365,7 +365,7 @@ bool Manager::ExportZipFile(HGByte** data, HGUInt* size)
{
*data = NULL;
*size = 0;
std::string devId;
GetCurDevId(devId);
......@@ -395,7 +395,7 @@ bool Manager::ExportZipFile(HGByte** data, HGUInt* size)
{
HGImage img = NULL;
std::string fileName = filePath + fileNameList[i];
zip_source_t* s = zip_source_file(z, fileName.c_str(), 0, 0);
if (NULL != s)
{
......@@ -774,7 +774,7 @@ std::string Manager::GetFilePath(const std::string& devId)
#if defined(HG_CMP_MSC)
sprintf(imgPath, "%sHuaGo/WebService/%s/", docsPath, Utf8ToAnsi(devId.c_str()).c_str());
#else
sprintf(imgPath, "%sHuaGo/WebService/%s/", docsPath, devId.c_str().c_str());
sprintf(imgPath, "%sHuaGo/WebService/%s/", docsPath, devId.c_str());
#endif
HGChar stdImgPath[512];
HGBase_StandardiseFileName(imgPath, stdImgPath, 512);
......@@ -913,7 +913,7 @@ HGByte* Manager::GetBuffer(const std::string& fileName, HGUInt* size)
if (*size > 0)
{
data = new HGByte[*size];
HGUInt readLen = (HGUInt)fread(data, 1, *size, file);
if (readLen != *size)
{
......@@ -971,7 +971,7 @@ int Manager::sane_ex_callback(SANE_Handle hdev, int code, void* data, unsigned i
if (p->m_devName.empty())
{
p->m_devName = sane_dev->name;
}
}
HGBase_LeaveLock(p->m_lock);
}
break;
......@@ -1099,4 +1099,4 @@ int Manager::sane_ex_callback(SANE_Handle hdev, int code, void* data, unsigned i
}
return 0;
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment