Subversion Repositories wimsdev

Rev

Rev 12363 | Rev 12381 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 12363 Rev 12373
Line 921... Line 921...
921
        printf("Content-type: %s\r\n\
921
        printf("Content-type: %s\r\n\
922
Content-length: %ld\r\n\r\n",mime,l);
922
Content-length: %ld\r\n\r\n",mime,l);
923
        catfile(stdout,"%s",fname); exit(0);
923
        catfile(stdout,"%s",fname); exit(0);
924
      }
924
      }
925
    }
925
    }
926
      case cmd_close: {
926
    case cmd_close: {
927
        char *p, b2[32]; int w;
927
      char *p, b2[32]; int w;
928
        char nbuf[MAX_FNAME+1], vbuf[MAX_LINELEN+1];
928
      char nbuf[MAX_FNAME+1], vbuf[MAX_LINELEN+1];
929
        p=getvar(ro_name[ro_session]);
929
      p=getvar(ro_name[ro_session]);
930
        if(p==NULL || strlen(p)<10 ||
930
      if(p==NULL || strlen(p)<10 ||
931
           strchr(p,'/')!=NULL) return;
931
         strchr(p,'/')!=NULL) return;
932
        mystrncpy(b2,p,sizeof(b2));
932
      mystrncpy(b2,p,sizeof(b2));
933
        p=strchr(b2,'.'); if(p!=NULL) *p=0;
933
      p=strchr(b2,'.'); if(p!=NULL) *p=0;
934
        mkfname(nbuf,"%s/%s/var.stat",session_dir,b2);
934
      mkfname(nbuf,"%s/%s/var.stat",session_dir,b2);
935
        getdef(nbuf,"wims_caller",vbuf);
935
      getdef(nbuf,"wims_caller",vbuf);
936
        if(vbuf[0]!=0) force_setvar(ro_name[ro_session],vbuf);
936
      if(vbuf[0]!=0) force_setvar(ro_name[ro_session],vbuf);
937
        w=wrapexec; wrapexec=1;
937
      w=wrapexec; wrapexec=1;
938
        call_sh("rm -Rf %s/%s* %s/%s* >/dev/null 2>&1",session_dir,b2,s2_dir,b2);
938
      call_sh("rm -Rf %s/%s* %s/%s* >/dev/null 2>&1",session_dir,b2,s2_dir,b2);
939
        wrapexec=w; cookiegot[0]=0;
939
      wrapexec=w; cookiegot[0]=0;
940
        force_setvar(ro_name[ro_cmd],"new");
940
      force_setvar(ro_name[ro_cmd],"new");
941
      }
941
    }
942
      default: return;
942
    default: return;
943
  }
943
  }
944
}
944
}
945
 
945
 
946
/* This is run only when manually invoking the program.
946
/* This is run only when manually invoking the program.
947
 * Verifies the orderedness of various list tables.
947
 * Verifies the orderedness of various list tables.