Addition of developer and user modes to debugcli
In order to be able to protect the interface so that mistyped argument do not endanger MaxScale yet still allow the developer access a router option has been added that gives the debugcli two modes.
This commit is contained in:
@ -269,6 +269,34 @@ return_succp :
|
||||
return succp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check to see if a session is valid, i.e. in the list of all sessions
|
||||
*
|
||||
* @param session Session to check
|
||||
* @return 1 if the session is valid otherwise 0
|
||||
*/
|
||||
int
|
||||
session_isvalid(SESSION *session)
|
||||
{
|
||||
SESSION *ptr;
|
||||
int rval = 0;
|
||||
|
||||
spinlock_acquire(&session_spin);
|
||||
ptr = allSessions;
|
||||
while (ptr)
|
||||
{
|
||||
if (ptr == session)
|
||||
{
|
||||
rval = 1;
|
||||
break;
|
||||
}
|
||||
ptr = ptr->next;
|
||||
}
|
||||
spinlock_release(&session_spin);
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
||||
/**
|
||||
* Print details of an individual session
|
||||
*
|
||||
|
Reference in New Issue
Block a user