|
各位大虾帮帮忙吧!
脚本单跑通过,controller中load generators中是localhost时也跑通了,但load generators中设为其他机器,如192.168.2.11时,连接是连通的,就是跑不通,老报错:
Vuser compilation failed
Error: CCI compilation error -In file included from c:\documents and settings\lisc\local settings\temp\brr_yar.531\global_dir\49714626\combined_lrTest1.c:2:
-19799
脚本如下:
#include "lrs.h"
#include "ACSvrDll.h"
/*
void ResCallback(unsigned short uNotifyId, void* pParam)
{
struct LoginIdentAgain_T* p = (struct LoginIdentAgain_T*)pParam;
lr_log_message("Login Success UserName: %s\r\n", p->pUIDData);
}
*/
vuser_init()
{
int ret = -1;
lrs_startup(257);
lr_start_transaction("调用ocx和dll");
// ret = lr_load_dll("c:\\Program Files\\antiCell(client&server)\\acClient.ocx");
ret = lr_load_dll("c:\\Program Files\\(client&server)\\acClient.ocx");
if(ret == -1)
{
lr_error_message("lr_load_dll failed\r\n");
lr_log_message("lr_load_dll failed\r\n");
return -1;
}
ret = lr_load_dll("ACSvrLogic.dll");
if(ret == -1)
{
lr_log_message("lr_load_dll failed\r\n");
return -1;
}
ret = ACSvrInit("192.168.2.98:8080", "c:\\Program Files\\(client&server)\\auth_file_bbs",35, NULL);
//ret = ACSvrInit("test.rec.com:8080", 3, NULL);
if(ret == 0)
{
lr_error_message("ACSvrInit failed\r\n");
lr_log_message("ACSvrInit failed\r\n");
return -1;
}
lr_end_transaction("调用ocx和dll", LR_AUTO);
return ret;
}
#include "lrs.h"
Action()
{
char szUserName[256];
int nResultLen;
int ret;
char szResult[512];
lr_start_transaction("登录");
strcpy(szUserName,lr_eval_string("{username}"));
strcpy(szResult,"0");
//char szUserName[256] = {"ibm1005@hotmail.com"};
// lr_log_message("%s",lr_eval_string("{username}"));
//szResult = {0};
nResultLen = sizeof(szResult);
ret = lrCall("192.168.2.98", 8080, szUserName, 35, NULL, szResult, &nResultLen);
//ret = lrCall("test.rec.com", 8080, szUserName, 3, NULL, szResult, &nResultLen);
lr_log_message("lrCall return: %d\r\n", ret);
lr_log_message("lrCall result size: %d\r\n", nResultLen);
lr_end_transaction("登录", LR_AUTO);
lr_start_transaction("服务器确认登录是否成功");
if(ret == 0 && nResultLen > 0)
{
ret = LoginIdentAgainReq((unsigned char*)szResult, nResultLen);
lr_log_message("LoginIdentAgainReq return: %s\r\n", ret ? "Success" : "Failed");
}
else
{
lr_error_message("lrCall return: %d\r\n", ret);
lr_error_message("lrCall result size: %d\r\n", nResultLen);
}
lr_end_transaction("服务器确认登录是否成功", LR_AUTO);
return 0;
}
#include "lrs.h"
vuser_end()
{
lrs_cleanup();
return 0;
} |
|