Revert "Type mismatch and debug_t is always >= 0"
This reverts commit 62dc7b6fe5
.
This commit is contained in:
parent
8a39621c64
commit
54b8bc6e86
2 changed files with 5 additions and 4 deletions
|
@ -78,11 +78,12 @@ bool control_h(connection_t *c, const char *request) {
|
|||
return control_ok(c, REQ_PURGE);
|
||||
|
||||
case REQ_SET_DEBUG: {
|
||||
debug_t new_level;
|
||||
int new_level;
|
||||
if(sscanf(request, "%*d %*d %d", &new_level) != 1)
|
||||
return false;
|
||||
send_request(c, "%d %d %d", CONTROL, REQ_SET_DEBUG, debug_level);
|
||||
debug_level = new_level;
|
||||
if(new_level >= 0)
|
||||
debug_level = new_level;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
#ifndef __TINC_CONTROL_H__
|
||||
#define __TINC_CONTROL_H__
|
||||
|
||||
extern bool init_control(void);
|
||||
extern void exit_control(void);
|
||||
extern bool init_control();
|
||||
extern void exit_control();
|
||||
extern char controlcookie[];
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue