소스 검색

Increased buffer size

Cyamond 5 년 전
부모
커밋
b006936a91
2개의 변경된 파일9개의 추가작업 그리고 9개의 파일을 삭제
  1. 6 6
      gui/src/main.cpp
  2. 3 3
      gui/src/qmlhandler.cpp

+ 6 - 6
gui/src/main.cpp

@@ -34,10 +34,9 @@ int main(int argc, char *argv[]) {
     // ask kernel to deliver SIGTERM in case the parent dies
     prctl(PR_SET_PDEATHSIG, SIGTERM);
 
-    // replace tee with your process
-    execl("../../cli/ccats-cli", "h", (char *)NULL);
-    // Nothing below this line should be executed by child process. If so,
-    // it means that the execl function wasn't successfull, so lets exit:
+    // Set the path to the CLI - pass argument h (help) for now
+    execl("../../cli/ccats-cli", "c", "127.0.0.1", (char *)NULL);
+
     exit(1);
   }
 
@@ -63,8 +62,9 @@ int main(int argc, char *argv[]) {
   QObject *item2 =
       engine.rootObjects().first()->findChild<QObject *>("disconnectbutton");
 
-  QObject::connect(item, SIGNAL(clicked()), &fooBar, SLOT(onClick()));
-  QObject::connect(item2, SIGNAL(clicked()), &fooBar, SLOT(onClick2()));
+  QObject::connect(item, SIGNAL(clicked()), &fooBar, SLOT(onConnectClick()));
+  QObject::connect(item2, SIGNAL(clicked()), &fooBar,
+                   SLOT(onDisconnectClick()));
 
   QObject::connect(&fooBar, SIGNAL(setStatusMessage(QVariant)),
                    engine.rootObjects().first(),

+ 3 - 3
gui/src/qmlhandler.cpp

@@ -2,9 +2,9 @@
 
 #include <unistd.h>
 
-extern int *inpipefd;
-extern int *outpipefd;
-extern char *buf;
+extern int inpipefd[2];
+extern int outpipefd[2];
+extern char buf[1024];
 
 QMLHandler::QMLHandler(QObject *parent) : QObject(parent) {}