summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/madc.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/madc.cpp b/src/madc.cpp
index 18ed477..6d4b680 100644
--- a/src/madc.cpp
+++ b/src/madc.cpp
@@ -61,6 +61,11 @@ static void handleCommand(char *cmd) {
}
}
+static void charHandler(short events) {
+ if(events & POLLIN)
+ rl_callback_read_char();
+}
+
static void activateReadline() {
if(parser->willDisconnect())
return;
@@ -107,7 +112,7 @@ int main(int argc, char *argv[]) {
parser = new Mad::Client::CommandParser(connection);
parser->signalFinished().connect(sigc::ptr_fun(activateReadline));
- Net::FdManager::getFdManager()->registerFd(STDIN_FILENO, sigc::hide(sigc::ptr_fun(rl_callback_read_char)));
+ Net::FdManager::getFdManager()->registerFd(STDIN_FILENO, sigc::ptr_fun(charHandler));
activateReadline();