mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-06 06:15:07 -05:00
Add reselect command
This commit is contained in:
17
cmdmon.c
17
cmdmon.c
@@ -161,7 +161,8 @@ static int permissions[] = {
|
||||
PERMIT_OPEN, /* ACTIVITY */
|
||||
PERMIT_AUTH, /* MODIFY_MINSTRATUM */
|
||||
PERMIT_AUTH, /* MODIFY_POLLTARGET */
|
||||
PERMIT_AUTH /* MODIFY_MAXDELAYDEVRATIO */
|
||||
PERMIT_AUTH, /* MODIFY_MAXDELAYDEVRATIO */
|
||||
PERMIT_AUTH /* RESELECT */
|
||||
};
|
||||
|
||||
/* ================================================== */
|
||||
@@ -1709,6 +1710,16 @@ handle_activity(CMD_Request *rx_message, CMD_Reply *tx_message)
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
static void
|
||||
handle_reselect(CMD_Request *rx_message, CMD_Reply *tx_message)
|
||||
{
|
||||
SRC_ReselectSource();
|
||||
tx_message->status = htons(STT_SUCCESS);
|
||||
return;
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
#if 0
|
||||
/* ================================================== */
|
||||
|
||||
@@ -2236,6 +2247,10 @@ read_from_cmd_socket(void *anything)
|
||||
handle_activity(&rx_message, &tx_message);
|
||||
break;
|
||||
|
||||
case REQ_RESELECT:
|
||||
handle_reselect(&rx_message, &tx_message);
|
||||
break;
|
||||
|
||||
case REQ_MODIFY_MINSTRATUM:
|
||||
handle_modify_minstratum(&rx_message, &tx_message);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user