- 论坛徽章:
- 0
|
void pthread_fun_share()
{
do{
EXEC SQL set connection 'proxy_test';
pthread_yield();
}while ( ( sqlca.sqlcode == -1802 ) );
static int i=0;
long ret=0,ret1=0;
int ret2=0,ret3=0,count=0;
char temp_id[]="1234321";
char time_tmp[40],time_now[40];
Instruct_Message ins_message = {"2010-05-11 16:29:00.37500","access_user","equiptname","255.255.255.255","8888","9999","portuser","instruction","127.127.127.127","client_meching_name"};
Security_Message sec_message = {"2010-05-18 16:19:41.37500","access_user","equipe_name","255.255.255.255","8888","9999","port_user","instruction","operation","remarkremarkremarkremarkremark","127.127.127.127","client_mechine_name"};
Interact_Message int_message = {1,1,"abcdefghijklmnopqrstuvwxyz"};
printf("第【%d】次创建线程成功:",++i);
getMiTime_back(time_now);
strcpy(ins_message.operation_time,time_now);
strcpy(sec_message.operation_time,time_now);
if(ret1>0)
{
int_message.instruction_log_id=ret1;
}
else
{
printf("获取instruction_log_id失败,ret1=[%d]\n",ret1);
exit(0);
}
ret3=write_security_log(&sec_message);
for(count=1;count<4;count++)//假设每次执行指令都有三次内容返回
{
int_message.content_index=count;
write_interaction_log(&int_message);
}
EXEC SQL set connection 'proxy_test' dormant;
} |
|