/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to client.cpp

  • Committer: Teddy Hogeborn
  • Date: 2008-01-30 17:28:18 UTC
  • Revision ID: teddy@fukt.bsnet.se-20080130172818-fnrq2xmtg1wa8wo2
* client.cpp (main): Get t_old early since it is used on error exits.

* server.py (Client.checker): New attribute.
  (Client.check_action, Client.start_checker, Client.stop_checker,
  Client.fileno, Client.next_stop, Client.still_valid,
  Client.it_is_time_to_check): New methods.
  (Client.handle_request): Alias to "check_action".
  (main): Stop all started checkers on exit.  Exit cleanly on keyboard
  interrupt.

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
 
67
67
  struct termios t_old, t_new;
68
68
  int status = 0;
69
 
 
 
69
  
 
70
  if (tcgetattr (STDIN_FILENO, &t_old) != 0){
 
71
    return 1;
 
72
  }
 
73
  
70
74
  session = initgnutls ();
71
75
 
72
76
#ifdef DEBUG
110
114
  FD_ZERO(&rfds_orig);
111
115
  FD_SET(udp_sd, &rfds_orig);
112
116
  FD_SET(STDIN_FILENO, &rfds_orig);
113
 
 
114
 
 
115
 
  if (tcgetattr (STDIN_FILENO, &t_old) != 0){
116
 
    return 1;
117
 
  }
 
117
  
118
118
  t_new = t_old;
119
119
  t_new.c_lflag &= ~ECHO;
120
120
  if (tcsetattr (STDIN_FILENO, TCSAFLUSH, &t_new) != 0){