[Feature][R305][task-view-1233][webui] add r305 v2 app
Change-Id: I8c2d738b1cb7f8384bc4f0731986f4f0308d6c67
diff --git a/lynq/R305/ap/app/goahead/server/cgi.c b/lynq/R305/ap/app/goahead/server/cgi.c
index c9286c6..8bf5bb3 100755
--- a/lynq/R305/ap/app/goahead/server/cgi.c
+++ b/lynq/R305/ap/app/goahead/server/cgi.c
@@ -59,10 +59,11 @@
}
// fmtAlloc(&cgiPath, FNAMESIZE, T("%s/%s/%s"), websGetDefaultDir(),
// CGI_BIN, cgiName);
- fmtAlloc(&cgiPath, FNAMESIZE, T("%s/%s"),"/etc_ro/cgi-bin", cgiName);
+ fmtAlloc(&cgiPath, FNAMESIZE, T("%s/%s"),"/sbin", cgiName);
{
gstat_t sbuf;
if (gstat(cgiPath, &sbuf) != 0 || (sbuf.st_mode & S_IFREG) == 0) {
+ system("rm -rf /tmp/firmware_tmp_file");
websError(wp, 200, T("CGI process file does not exist"));
bfree(B_L, cgiPath);
return 1;
@@ -162,6 +163,7 @@
if ((pHandle = websLaunchCgiProc(cgiPath, argp, envp, stdIn, stdOut))
== -1) {
+ system("rm -rf /tmp/firmware_tmp_file");
websError(wp, 200, T("failed to spawn CGI task"));
for (ep = envp; *ep != NULL; ep++) {
bfreeSafe(B_L, *ep);