servlib/cmd/BPQCommand.cc
changeset 67 cfe2328ba1c6
parent 66 e1101c5d54a1
equal deleted inserted replaced
66:e1101c5d54a1 67:cfe2328ba1c6
    39         wrong_num_args(argc, argv, 1, 2, INT_MAX);
    39         wrong_num_args(argc, argv, 1, 2, INT_MAX);
    40         return TCL_ERROR;
    40         return TCL_ERROR;
    41     }
    41     }
    42     const char* op = argv[1];
    42     const char* op = argv[1];
    43 
    43 
    44     if (strncmp(op, "enabled", strlen("enabled")) == 0) {
    44     if (strncmp(op, "enable", strlen("enable")) == 0) {
    45 
    45 
    46 		BundleDaemon::instance()->bpq_cache()->cache_enabled_ = true;
    46 		BundleDaemon::instance()->bpq_cache()->cache_enabled_ = true;
       
    47 		return TCL_OK;
       
    48 
       
    49     } else if(strncmp(op, "disable", strlen("disable")) == 0) {
       
    50 
       
    51     	BundleDaemon::instance()->bpq_cache()->cache_enabled_ = false;
    47 		return TCL_OK;
    52 		return TCL_OK;
    48 
    53 
    49     } else if(strncmp(op, "cache_size", strlen("cache_size")) == 0) {
    54     } else if(strncmp(op, "cache_size", strlen("cache_size")) == 0) {
    50         if (argc < 3) {
    55         if (argc < 3) {
    51             wrong_num_args(argc, argv, 2, 3, INT_MAX);
    56             wrong_num_args(argc, argv, 2, 3, INT_MAX);