undefined4 ExeCgiCmd(void)
{
int result;
int *piVar3;
size_t key_value_len;
char *key_value_end_ptr;
char local_214 [200];
char acStack_14c [256];
timespec local_4c;
timespec local_44;
char *local_3c;
char *local_38;
char *local_34;
uint local_30;
FILE *local_2c;
undefined8 local_28;
byte *local_20;
int cgi_num;
CgiParam *cgi_ptr;
FILE *pFVar2;
cgi_num = 0;
do {
if (CgiNum <= cgi_num) {
return 0;
}
result
= strcmp(CgiParamA
[cgi_num
].
property,"AWB");
if (result == 0) {
LAB_00012f2a:
fprintf(stderr
,"CgiParamA[i].property=%s\n",cgi_num
* 0x200 + 0x29204);
result
= strcmp(CgiParamA
[cgi_num
].
property,"TimeSettings");
if (result == 0) {
Cgi_CheckValue(cgi_num);
}
result
= strcmp(CgiParamA
[cgi_num
].
action,"set");
if (result == 0) {
sprintf(acStack_14c
,"./CGI_PROCESS.sh %s %s %s 1>&2",CgiParamA
+ cgi_num
,
cgi_num * 0x200 + 0x29204,cgi_num * 0x200 + 0x29244);
local_30
= system(acStack_14c
);
pFVar2 = stderr;
if ((((int)local_30 < 0) || ((local_30 & 0x7f) != 0)) || ((local_30 >> 8 & 0xff) != 0)) {
piVar3 = __errno_location();
fprintf(pFVar2
,"%s: cmd=%s (error: %s)\n\r","ExeCgiCmd",acStack_14c
,key_value_end_ptr
);
fwrite(&DAT_00017eec
,1,4,stdout
);
fwrite(&DAT_00017ef4
,1,4,stdout
);
fwrite(&DAT_00017eec
,1,4,stderr
);
fwrite(&DAT_00017ef4
,1,4,stderr
);
}
else {
}
result
= strcmp(CgiParamA
[cgi_num
].
property,"AWB");
if (result == 0) {
LAB_0001357a:
result
= strcmp(CgiParamA
[cgi_num
].
property,"Exposure");
if (result == 0) {
CgiParamA[cgi_num].property[0] = 'E';
CgiParamA[cgi_num].property[1] = 'V';
CgiParamA[cgi_num].property[2] = '\0';
}
result
= strcmp(CgiParamA
[cgi_num
].
property,"Imageres");
if (result == 0) {
builtin_strncpy(CgiParamA[cgi_num].property,"Imag",4);
builtin_strncpy(CgiParamA[cgi_num].property + 4,"eRes",4);
CgiParamA[cgi_num].property[8] = '\0';
}
result
= strcmp(CgiParamA
[cgi_num
].
property,"Videores");
if (result == 0) {
builtin_strncpy(CgiParamA[cgi_num].property,"Vide",4);
builtin_strncpy(CgiParamA[cgi_num].property + 4,"oRes",4);
CgiParamA[cgi_num].property[8] = '\0';
}
builtin_strncpy(CgiParamA[cgi_num].key_value,"Came",4);
builtin_strncpy(CgiParamA[cgi_num].key_value + 4,"ra.M",4);
builtin_strncpy(CgiParamA[cgi_num].key_value + 8,"enu.",4);
CgiParamA[cgi_num].key_value[0xc] = '\0';
strcat(CgiParamA
[cgi_num
].
key_value,CgiParamA
[cgi_num
].
property);
cgi_ptr = CgiParamA + cgi_num;
key_value_len
= strlen(cgi_ptr
->key_value
);
key_value_end_ptr = cgi_ptr->key_value + key_value_len;
key_value_end_ptr[0] = '=';
key_value_end_ptr[1] = '\0';
strcat(CgiParamA
[cgi_num
].
key_value,CgiParamA
[cgi_num
].
value);
fprintf(stderr
,"%s: key_value[%d]= %s\n\r","ExeCgiCmd",cgi_num
,cgi_num
* 0x200 + 0x29384);
SetProcess(cgi_num * 0x200 + 0x29384);
}
else {
result
= strcmp(CgiParamA
[cgi_num
].
property,"EV");
if (result == 0) goto LAB_0001357a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Exposure");
if (result == 0) goto LAB_0001357a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Flicker");
if (result == 0) goto LAB_0001357a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"ImageRes");
if (result == 0) goto LAB_0001357a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Imageres");
if (result == 0) goto LAB_0001357a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"MTD");
if (result == 0) goto LAB_0001357a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"VideoRes");
if (result == 0) goto LAB_0001357a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Videores");
if (result == 0) goto LAB_0001357a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"VideoClipTime");
if (result == 0) goto LAB_0001357a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"LoopingVideo");
if (result == 0) goto LAB_0001357a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"SoundRecord");
if (result == 0) goto LAB_0001357a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"RecStamp");
if (result == 0) goto LAB_0001357a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"SpeedUint");
if (result == 0) goto LAB_0001357a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"SpeedCamAlert");
if (result == 0) goto LAB_0001357a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"SpeedLimitAlert");
if (result == 0) goto LAB_0001357a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"TimeZone");
if (result == 0) goto LAB_0001357a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"SyncTime");
if (result == 0) goto LAB_0001357a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"GSensor");
if (result == 0) goto LAB_0001357a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"PosSetting_Add");
if (result == 0) goto LAB_0001357a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"PosSetting_DelLast");
if (result == 0) goto LAB_0001357a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"PosSetting_DelAll");
if (result == 0) goto LAB_0001357a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"VoiceSwitch");
if (result == 0) goto LAB_0001357a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"ParkingMonitor");
if (result == 0) goto LAB_0001357a;
}
result
= strcmp(CgiParamA
[cgi_num
].
property,"MovieAudio");
if (result == 0) {
builtin_strncpy(CgiParamA[cgi_num].key_value,"Came",4);
builtin_strncpy(CgiParamA[cgi_num].key_value + 4,"ra.P",4);
builtin_strncpy(CgiParamA[cgi_num].key_value + 8,"revi",4);
builtin_strncpy(CgiParamA[cgi_num].key_value + 0xc,"ew.M",4);
builtin_strncpy(CgiParamA[cgi_num].key_value + 0x10,"JPEG",4);
builtin_strncpy(CgiParamA[cgi_num].key_value + 0x14,".sta",4);
builtin_strncpy(CgiParamA[cgi_num].key_value + 0x18,"tus.",4);
CgiParamA[cgi_num].key_value[0x1c] = '\0';
strcat(CgiParamA
[cgi_num
].
key_value,CgiParamA
[cgi_num
].
property);
cgi_ptr = CgiParamA + cgi_num;
key_value_len
= strlen(cgi_ptr
->key_value
);
key_value_end_ptr = cgi_ptr->key_value + key_value_len;
key_value_end_ptr[0] = '=';
key_value_end_ptr[1] = '\0';
strcat(CgiParamA
[cgi_num
].
key_value,CgiParamA
[cgi_num
].
value);
fprintf(stderr
,"%s: key_value[%d]= %s\n\r","ExeCgiCmd",cgi_num
,cgi_num
* 0x200 + 0x29384);
SetProcess(cgi_num * 0x200 + 0x29384);
}
}
else {
result
= strcmp(CgiParamA
[cgi_num
].
action,"get");
if (result == 0) {
local_214[0] = '\0';
local_214[1] = '\0';
local_214[2] = '\0';
local_214[3] = '\0';
local_28._0_4_ = 0;
local_28._4_4_ = 0;
sprintf(acStack_14c
,"./CGI_PROCESS.sh %s %s",CgiParamA
+ cgi_num
,cgi_num
* 0x200 + 0x29204
);
result
= strcmp(CgiParamA
[cgi_num
].
property,"duration");
if (result == 0) {
sprintf(local_214
,"%s",cgi_num
* 0x200 + 0x29244);
local_28 = GetFileDuration(local_214);
fprintf(stdout
,"%llu\n",(int)local_28
,(int)((ulonglong
)local_28
>> 0x20));
}
else {
local_2c = popen(acStack_14c,"r");
pFVar2 = stderr;
if (local_2c == (FILE *)0x0) {
piVar3 = __errno_location();
result = *piVar3;
piVar3 = __errno_location();
fprintf(pFVar2
,"%s: popen, errno(%d), %s\n\r","ExeCgiCmd",result
,key_value_end_ptr
);
return 0xffffffff;
}
while (key_value_end_ptr
= fgets(local_214
,200,local_2c
),
key_value_end_ptr != (char *)0x0) {
}
pclose(local_2c);
}
result
= strcmp(CgiParamA
[cgi_num
].
property,"Camera.Menu.SDInfo");
if (result != 0) {
result
= strcmp(CgiParamA
[cgi_num
].
property,"Camera.menu.FWVersion");
if (result != 0) {
result
= strcmp(CgiParamA
[cgi_num
].
property,"Camera.Preview.RTSP.av");
if (result != 0) {
result
= strcmp(CgiParamA
[cgi_num
].
property,"Camera.menu.DeviceUUID");
if (result != 0) {
result
= strcmp(CgiParamA
[cgi_num
].
property,"Camera.menu.UUID");
if (result != 0) {
GetProcess(cgi_num * 0x200 + 0x29204);
goto LAB_00013c90;
}
}
goto LAB_00013c90;
}
}
}
}
else {
result
= strcmp(CgiParamA
[cgi_num
].
action,"del");
if (result == 0) {
result
= strncmp(CgiParamA
[cgi_num
].
property,"$mnt$mmc$",9);
if (result == 0) {
while( true ) {
local_20
= (byte
*)strchr(CgiParamA
[cgi_num
].
property,0x24);
if (local_20 == (byte *)0x0) break;
fprintf(stderr
,"%s: substitute=%c\n\r","ExeCgiCmd",(uint
)*local_20
);
*local_20 = 0x2f;
fprintf(stderr
,"%s: substitute=%c\n\r","ExeCgiCmd",(uint
)*local_20
);
}
fprintf(stderr
,"%s: break\n\r","ExeCgiCmd");
}
sprintf(acStack_14c
,"./CGI_PROCESS.sh %s %s 1>&2",CgiParamA
+ cgi_num
,
cgi_num * 0x200 + 0x29204);
}
}
}
LAB_00013c90:
result
= strcmp(CgiParamA
[cgi_num
].
action,"set");
if (result == 0) {
result
= strcmp(CgiParamA
[cgi_num
].
property,"65");
if (result == 0) {
result = clock_gettime(0,&local_44);
if (result == -1) {
fprintf(stderr
,"%s: clock_gettime error\n\r","ExeCgiCmd");
}
else {
fprintf(stderr
,"%s: gtime.tv_sec=%ld\n\r","ExeCgiCmd",local_44.
tv_sec);
fprintf(stderr
,"%s: gtime.tv_nsec=%ld\n\r","ExeCgiCmd",local_44.
tv_nsec);
}
local_34 = CgiParamA[cgi_num].value;
local_38 = ".";
local_3c
= strtok(local_34
,".");
fprintf(stderr
,"%s: tmpstr=%s\n\r","ExeCgiCmd",local_3c
);
local_4c.
tv_sec = atoi(local_3c
);
fprintf(stderr
,"%s: stime.tv_sec=%ld\n\r","ExeCgiCmd",local_4c.
tv_sec);
while( true ) {
local_3c
= strtok((char *)0x0,local_38
);
if (local_3c == (char *)0x0) break;
fprintf(stderr
,"%s: tmpstr=%s\n\r","ExeCgiCmd",local_3c
);
local_4c.
tv_nsec = atoi(local_3c
);
fprintf(stderr
,"%s: stime.tv_nsec=%ld\n\r","ExeCgiCmd",local_4c.
tv_nsec);
}
result = clock_settime(0,&local_4c);
if (result == -1) {
fprintf(stderr
,"%s: clock_settime error\n\r","ExeCgiCmd");
}
}
}
}
else {
result
= strcmp(CgiParamA
[cgi_num
].
property,"EV");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Exposure");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Flicker");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"ImageRes");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Imageres");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"MTD");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"VideoRes");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Videores");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"VideoClipTime");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"LoopingVideo");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"SoundRecord");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"MovieAudio");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"RecStamp");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"SpeedUint");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"SpeedCamAlert");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"SpeedLimitAlert");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"TimeZone");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"SyncTime");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"PosSetting_Add");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"PosSetting_DelLast");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"PosSetting_DelAll");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"FactoryReset");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"ParkingMonitor");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"VoiceSwitch");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"GSensor");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Camera.Preview.*");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Camera.Menu.*");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Camera.Menu.CardInfo.*");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Camera.Menu.RearStarus");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Camera.Menu.SDInfo");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"OTAUpdate");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"FWUpdateDate");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Camera.menu.DeviceUUID");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Camera.menu.UUID");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Camera.menu.FWVersion");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"FWVersion");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"device_name");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"streamer");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"forceiframe");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"setbitrate");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"setframerate");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"setvideogop");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"reset_to_default");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"reboot");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"streamerstatus");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"file_list");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"devinfo.fwver");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"devinfo.macaddr");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"devinfo.linuxkernelver");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"thumb.jpeg");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"duration");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Camera.System.Power");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Camera.Preview.MJPEG.status.*");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Camera.Preview.MJPEG.TimeStamp");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Camera.Preview.MJPEG.TimeStamp.*");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Net.WIFI_AP.SSID");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Net.WIFI_AP.CryptoKey");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Net.WIFI_STA.AP.2.SSID");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Net.WIFI_STA.AP.2.CryptoKey");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Video");
if (result == 0) goto LAB_00012f2a;
result
= strncmp(CgiParamA
[cgi_num
].
property,"$mnt$mmc$",9);
if (result == 0) goto LAB_00012f2a;
result
= strncmp(CgiParamA
[cgi_num
].
property,"/mnt/mmc/",9);
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"TimeSettings");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"SD0");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Camera.Menu.RearStarus");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Net");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Playback");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Camera.Menu.APPConnection");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"StreamStatus");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"TimeSettings");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Setting");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"NRecRes");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"NRecWb");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"NRecEv");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"NRecMeMode");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"NRecShap");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"NRecEffect");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"NRecISO");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"NRecWaterM");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"NRecMMute");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"NRecMTD");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"NRecEIS");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"SRecType");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"SRecWb");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"SRecEv");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"SRecMeMode");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"SRecShap");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"SRecEffect");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"SRecWaterM");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"LRecRes");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"LRecTime");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"LRecWb");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"LRecEv");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"LRecMeMode");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"LRecShap");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"LRecEffect");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"LRecISO");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"LRecWaterM");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"LRecMMute");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"LRecMTD");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"LRecEIS");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"TLRecRes");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"TLRecIntervals");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"TLRecWb");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"TLRecEv");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"TLRecTime");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"TLRecMeMode");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"TLRecShap");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"TLRecEffect");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"TLRecISO");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"TLRecWaterM");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"NPhotoRes");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"NPhotoWb");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"NPhotoEv");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"NPhotoMeMode");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"NPhotoShap");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"NPhotoLEv");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"NPhotoISO");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"NPhotoWaterM");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"APhotoRes");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"APhotoIntervals");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"APhotoWb");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"APhotoEv");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"APhotoMeMode");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"APhotoShap");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"APhotoISO");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"APhotoWaterM");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"CPhotoRes");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"CPhotoIntervals");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"CPhotoWb");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"CPhotoEv");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"CPhotoMeMode");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"CPhotoFEQ");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"CPhotoShap");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"CPhotoISO");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"CPhotoWaterM");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"TPhotoRes");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"TPhotoCountDown");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"TPhotoWb");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"TPhotoEv");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"TPhotoMeMode");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"TPhotoShap");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"TPhotoISO");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"MovieSin");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"WiFi");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Flicker");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"LedOn");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"BLTime");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"PowerOffTime");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"KeyTone");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"PowerOnAudio");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Lan");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"DateTimeMode");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"PlaybackVolume");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"CarDriverMode");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"BLlevel");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"sysworkmode");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Camera.Menu.sysworkmode");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"battery");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"SyncTime");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"keepalive");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"rtsp_info");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
property,"Camera.Preview.RTSP.av");
if (result == 0) goto LAB_00012f2a;
result
= strcmp(CgiParamA
[cgi_num
].
action,"dir");
if (result == 0) {
LAB_00014038:
result
= strcmp(CgiParamA
[cgi_num
].
property,"DCIM");
if (result == 0) {
builtin_strncpy(CgiParamA[cgi_num].property,"Norm",4);
CgiParamA[cgi_num].property[4] = 'a';
CgiParamA[cgi_num].property[5] = 'l';
CgiParamA[cgi_num].property[6] = '\0';
}
result = strcasecmp(CgiParamA[cgi_num].format,"jpeg");
if (result == 0) {
builtin_strncpy(CgiParamA[cgi_num].format,"JPG",4);
}
directory(CgiParamA + cgi_num,cgi_num * 0x200 + 0x29204,cgi_num * 0x200 + 0x29284,
cgi_num * 0x200 + 0x292c4,cgi_num * 0x200 + 0x29304);
}
else {
result
= strcmp(CgiParamA
[cgi_num
].
action,"reardir");
if (result == 0) goto LAB_00014038;
result
= strcmp(CgiParamA
[cgi_num
].
action,"get");
if (result == 0) {
GetProcess(cgi_num * 0x200 + 0x29204);
}
else {
result
= strcmp(CgiParamA
[cgi_num
].
action,"set");
if (result == 0) {
result
= strcmp(CgiParamA
[cgi_num
].
property,"Playback");
if (result == 0) {
result
= strcmp(CgiParamA
[cgi_num
].
value,"heartbeat");
if (result == 0) {
goto LAB_000143ce;
}
}
}
result
= strcmp(CgiParamA
[cgi_num
].
action,"set");
if (result == 0) {
strcpy(CgiParamA
[cgi_num
].
key_value,CgiParamA
[cgi_num
].
property);
cgi_ptr = CgiParamA + cgi_num;
key_value_len
= strlen(cgi_ptr
->key_value
);
key_value_end_ptr = cgi_ptr->key_value + key_value_len;
key_value_end_ptr[0] = '=';
key_value_end_ptr[1] = '\0';
strcat(CgiParamA
[cgi_num
].
key_value,CgiParamA
[cgi_num
].
value);
fprintf(stderr
,"%s: key_value[%d]= %s\n\r","ExeCgiCmd",cgi_num
,cgi_num
* 0x200 + 0x29384
);
SetProcess(cgi_num * 0x200 + 0x29384);
}
else {
result
= strcmp(CgiParamA
[cgi_num
].
action,"del");
if (result == 0) {
DelProcess(cgi_num * 0x200 + 0x29204);
}
else {
result
= strcmp(CgiParamA
[cgi_num
].
action,"setcamid");
if (result == 0) {
}
else {
fprintf(stderr
,"CgiParam error, %s %s %s\n",CgiParamA
+ cgi_num
,
cgi_num * 0x200 + 0x29204,cgi_num * 0x200 + 0x29244);
fwrite(&DAT_00017eec
,1,4,stdout
);
fwrite(&DAT_00017ef4
,1,4,stdout
);
fwrite(&DAT_00017eec
,1,4,stderr
);
fwrite(&DAT_00017ef4
,1,4,stderr
);
}
}
}
}
}
}
LAB_000143ce:
cgi_num = cgi_num + 1;
} while( true );
}