Fix nswering procedure: have to use source resource.
[anna.git] / example / comm / blocker / main.cpp
index c8723b5..354d9b0 100644 (file)
@@ -134,7 +134,7 @@ void MyCommunicator::eventReceiveMessage (ClientSocket& clientSocket, const Mess
    app::Application& app = app::functions::getApp ();
    cout << "Bloqueando las comunicaciones ejecute (kill -9 " << app.getPid ()  << ") ... " << flush;
    while (stop == false) {
-      if (gets (aux) != NULL) {
+      if (fgets(aux, sizeof(aux), stdin) != NULL) {
          if (aux [0] == 'q' || aux [0] == 'Q')
             stop = true;
       }