GitHub PullRequestReviewCommentEvent at 2014-05-19 10:02:04
Repository: Thywin
Actor: Glowbal
Payload: {"comment":{"url":"https://api.github.com/repos/Thywin/Thywin/pulls/comments/12787206","id":12787206,"diff_hunk":"@@ -2,22 +2,55 @@\n  * main.hpp\n  *\n  *  Created on: 25 apr. 2014\n- *      Author: Thomas, Bobby\n+ *      Author: Thomas Kooi, Bobby Bouwmann\n  */\n \n #include <stdlib.h>\n #include <stdio.h>\n+#include <iostream>\n #include \"crawler.h\"\n+#include \"Communicator.h\"\n \n-int main()\n+using namespace thywin;\n+\n+int main(int argc, char** argv)\n {\n+\tint NUMBER_OF_CLIENTS = 10;\n+\n+\tif (argc > 2)\n+\t{\n+\t\tstd::cout << \"Usage: ./crawler [numberOfClients]\" << std::endl;\n+\t\texit(EXIT_FAILURE);\n+\t}\n+\n+\tif (argc == 2)\n+\t{\n+\t\tNUMBER_OF_CLIENTS = atoi(argv[1]);\n+\t}\n+\n \tconst std::string ipaddress = \"192.168.100.11\";\n+\tconst int port = 7500;\n+\n+\tfor (int i = 0; i < NUMBER_OF_CLIENTS - 1; i++)\n+\t{\n+\t\tpid_t processID = fork();\n+\t\tif (processID == -1)\n+\t\t{\n+\t\t\tperror(\"Preforking failed\");\n+\t\t\texit(EXIT_FAILURE);\n+\t\t}\n+\t\telse if (processID == 0)","path":"source/crawler/main.cpp","position":43,"original_position":43,"commit_id":"d05d53608a3b8563e5d7d497418c92086c6ec436","original_commit_id":"d05d53608a3b8563e5d7d497418c92086c6ec436","user":{"login":"Glowbal","id":5007509,"avatar_url":"https://avatars.githubusercontent.com/u/5007509?","gravatar_id":"099c8ed6bc217f7c2bbeb2663db600c3","url":"https://api.github.com/users/Glowbal","html_url":"https://github.com/Glowbal","followers_url":"https://api.github.com/users/Glowbal/followers","following_url":"https://api.github.com/users/Glowbal/following{/other_user}","gists_url":"https://api.github.com/users/Glowbal/gists{/gist_id}","starred_url":"https://api.github.com/users/Glowbal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Glowbal/subscriptions","organizations_url":"https://api.github.com/users/Glowbal/orgs","repos_url":"https://api.github.com/users/Glowbal/repos","events_url":"https://api.github.com/users/Glowbal/events{/privacy}","received_events_url":"https://api.github.com/users/Glowbal/received_events","type":"User","site_admin":false},"body":"If we are not doing anything in this if statement, why do we have it?","created_at":"2014-05-19T10:02:04Z","updated_at":"2014-05-19T10:02:04Z","html_url":"https://github.com/Thywin/Thywin/pull/4#discussion_r12787206","pull_request_url":"https://api.github.com/repos/Thywin/Thywin/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/Thywin/Thywin/pulls/comments/12787206"},"html":{"href":"https://github.com/Thywin/Thywin/pull/4#discussion_r12787206"},"pull_request":{"href":"https://api.github.com/repos/Thywin/Thywin/pulls/4"}}}}