/[monit]/monit/http/cervlet.c
ViewVC logotype

Diff of /monit/http/cervlet.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.49 by hauk, Sun Dec 29 22:43:27 2002 UTC revision 1.50 by martinp, Mon Feb 10 00:09:19 2003 UTC
# Line 539  static void handle_action(HttpRequest re Line 539  static void handle_action(HttpRequest re
539    
540          if(p->start)          if(p->start)
541    
542            check_process(name, action, TRUE);            check_process(name, action);
543    
544          else {          else {
545    
# Line 555  static void handle_action(HttpRequest re Line 555  static void handle_action(HttpRequest re
555    
556          if(p->stop)          if(p->stop)
557    
558            check_process(name, action, TRUE);            check_process(name, action);
559    
560          else {          else {
561    
# Line 567  static void handle_action(HttpRequest re Line 567  static void handle_action(HttpRequest re
567    
568        }        }
569                    
570          if( is(action, "restart") ) {
571    
572            if(p->start && p->stop) {
573    
574              check_process(name, action);
575    
576            } else {
577    
578              send_error(res, SC_BAD_REQUEST,
579                "Start or stop method not defined for the process");
580              goto quit;
581    
582            }
583    
584          }
585            
586        if(is(action, "status")) {        if(is(action, "status")) {
587    
588          print_status(p, res);          print_status(p, res);
# Line 822  static void do_process(HttpRequest req, Line 838  static void do_process(HttpRequest req,
838         "<input type=hidden value='stop' name=action>"         "<input type=hidden value='stop' name=action>"
839         "<input type=submit value='Stop program' style='font-size: 12pt'></font>"         "<input type=submit value='Stop program' style='font-size: 12pt'></font>"
840         "</form></td>", name);         "</form></td>", name);
841      if(p->start && p->stop)
842        out_print(res,
843           "<td><form method=GET action=/%s>"
844           "<input type=hidden value='restart' name=action>"
845           "<input type=submit value='Restart program' style='font-size: 12pt'></font>"
846           "</form></td>", name);
847    out_print(res, "</tr></table>");    out_print(res, "</tr></table>");
848    
849    FOOT    FOOT

Legend:
Removed from v.1.49  
changed lines
  Added in v.1.50

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26