server: bounded controls: refactor code to avoid duplication