调整压力测试
This commit is contained in:
parent
2b5be77410
commit
ae04876dc7
|
@ -300,19 +300,24 @@ public:
|
||||||
size_t l = 0;
|
size_t l = 0;
|
||||||
bool type = true;
|
bool type = true;
|
||||||
wchar_t buf[128] =L"";
|
wchar_t buf[128] =L"";
|
||||||
int ret = str_to_wchar((char*)data, (wchar_t*)wstr.c_str(), &l);
|
int ret = SCANNER_ERR_OK;
|
||||||
if (ret == ERROR_INSUFFICIENT_BUFFER)
|
if (code != SANE_EVENT_IMAGE_OK)
|
||||||
{
|
|
||||||
wstr.resize(l);
|
|
||||||
ret = str_to_wchar((char*)data, (wchar_t*)wstr.c_str(), &l);
|
|
||||||
}
|
|
||||||
if (ret == ERROR_INSUFFICIENT_BUFFER)
|
|
||||||
{
|
{
|
||||||
type = false;
|
ret = str_to_wchar((char*)data, (wchar_t*)wstr.c_str(), &l);
|
||||||
|
if (ret == ERROR_INSUFFICIENT_BUFFER)
|
||||||
h->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void*)wstr.c_str(), type);
|
{
|
||||||
return -1;
|
wstr.resize(l);
|
||||||
|
ret = str_to_wchar((char*)data, (wchar_t*)wstr.c_str(), &l);
|
||||||
|
}
|
||||||
|
if (ret == ERROR_INSUFFICIENT_BUFFER)
|
||||||
|
{
|
||||||
|
type = false;
|
||||||
|
|
||||||
|
h->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void*)wstr.c_str(), type);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//std::string str = StringToUtf((char*)data);
|
//std::string str = StringToUtf((char*)data);
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue