- if (system(cmd) == 0) {
- net_sock = accept(sock, (struct sockaddr*)0, (unsigned int*)0);
- // close(sock);
- if (net_sock != 0) {
- WriteMessage("NETWORK successfully connected");
- fcntl(net_sock, F_SETFL, O_NONBLOCK|fcntl(net_sock,
- F_GETFL, 0));
- on=1;
- setsockopt(net_sock, IPPROTO_TCP, TCP_NODELAY,
- (char*)&on, sizeof(on));
- } else {
- WriteMessage("Cannot connect NETWORK resources");
- WriteMessage("Exiting...");
- sleep(2);
- on_actionQuit_triggered();
- }
- /* system OK */
+ net_sock = accept(sock, (struct sockaddr*)0, (unsigned int*)0);
+ // close(sock);
+ if (net_sock != 0) {
+ WriteMessage("NETWORK successfully connected");
+ fcntl(net_sock, F_SETFL, O_NONBLOCK|fcntl(net_sock, F_GETFL, 0));
+ on = 1;
+ setsockopt(net_sock, IPPROTO_TCP, TCP_NODELAY, (char*)&on, sizeof(on));