先放代码:
IpcInfo info;
if(UI_lookup_ipc(ipc_id, info))//从数据库获取对应id的ipc信息
{
return -1 ;
}
char *xaddr = (char *)malloc(256);
memset(xaddr, '\0', 256);
sprintf(xaddr, "http://%s:%d/onvif/device_service", info.net_info.ip_addr1, 80);
if( NULL == xaddr || '\0' == xaddr[0])
{
DBGLOG("param invalid!");
return -1;
}
struct soap *soap=discovery_get_soap(); //soap_new();
if (NULL==soap)
{
printf("the soap fails to create!\n");
return -1;
}
struct _tds__GetCapabilities *tds__GetCapabilities = (struct _tds__GetCapabilities *)soap_mallocz( soap, sizeof(struct _tds__GetCapabilities));
struct _tds__GetCapabilitiesResponse *tds__GetCapabilitiesResponse
= (struct _tds__GetCapabilitiesResponse *)soap_mallocz( soap, sizeof(struct _tds__GetCapabilitiesResponse));
struct _trt__GetProfilesResponse *trt__GetProfilesResponse=(struct _trt__GetProfilesResponse *)soap_mallocz( soap, sizeof(struct _trt__GetProfilesResponse));
struct _trt__GetProfiles *trt__GetProfiles=(struct _trt__GetProfiles *)soap_mallocz( soap, sizeof(struct _trt__GetProfiles));
char username[MAX_TOKEN_LEN] = {""};
char password[MAX_TOKEN_LEN];
UI_lookup_passwd(ipc_id, username, password);//从数据库中获得对应的账号密码信息
int diffTi