{"action":"created","comment":{"url":"https://api.github.com/repos/acquaman/AcquamanDataServer/pulls/comments/35128547","id":35128547,"diff_hunk":"@@ -0,0 +1,50 @@\n+#include \"source/AMDSThreadedTCPDataServer.h\"\n+\n+#include <QCoreApplication>\n+\n+AMDSThreadedTCPDataServer::AMDSThreadedTCPDataServer(QString hwType, QObject *parent) :\n+\tQObject(parent)\n+{\n+\thwType_ = hwType;\n+\n+\tthread_ = new QThread;\n+\tserver_ = new AMDSTCPDataServer;\n+\n+\tconnect(thread_, SIGNAL(started()), this, SLOT(onThreadStarted()));\n+\tconnect(this, SIGNAL(startServer(QString,quint16)), server_, SLOT(start(QString,quint16)));\n+\tconnect(server_, SIGNAL(error(quint8,quint16,QString)), this, SIGNAL(error(quint8,quint16,QString)));\n+\n+\tserver_->moveToThread(thread_);\n+\tthread_->start(QThread::LowPriority);\n+}\n+\n+AMDSThreadedTCPDataServer::~AMDSThreadedTCPDataServer()\n+{\n+\tif (thread_->isRunning())\n+\t\tthread_->terminate();","path":"source/AMDSThreadedTCPDataServer.cpp","position":24,"original_position":24,"commit_id":"d96c4c51cdd46361cb988451b91d9aaba7d94d90","original_commit_id":"d96c4c51cdd46361cb988451b91d9aaba7d94d90","user":{"login":"dretrex","id":602741,"avatar_url":"https://avatars.githubusercontent.com/u/602741?v=3","gravatar_id":"","url":"https://api.github.com/users/dretrex","html_url":"https://github.com/dretrex","followers_url":"https://api.github.com/users/dretrex/followers","following_url":"https://api.github.com/users/dretrex/following{/other_user}","gists_url":"https://api.github.com/users/dretrex/gists{/gist_id}","starred_url":"https://api.github.com/users/dretrex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dretrex/subscriptions","organizations_url":"https://api.github.com/users/dretrex/orgs","repos_url":"https://api.github.com/users/dretrex/repos","events_url":"https://api.github.com/users/dretrex/events{/privacy}","received_events_url":"https://api.github.com/users/dretrex/received_events","type":"User","site_admin":false},"body":"@iainworkman noticed this in a diffferent pull request, but you should probably be using `QThread::quit()` instead.","created_at":"2015-07-21T17:19:23Z","updated_at":"2015-07-21T17:19:23Z","html_url":"https://github.com/acquaman/AcquamanDataServer/pull/40#discussion_r35128547","pull_request_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/pulls/40","_links":{"self":{"href":"https://api.github.com/repos/acquaman/AcquamanDataServer/pulls/comments/35128547"},"html":{"href":"https://github.com/acquaman/AcquamanDataServer/pull/40#discussion_r35128547"},"pull_request":{"href":"https://api.github.com/repos/acquaman/AcquamanDataServer/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/acquaman/AcquamanDataServer/pulls/40","id":39423850,"html_url":"https://github.com/acquaman/AcquamanDataServer/pull/40","diff_url":"https://github.com/acquaman/AcquamanDataServer/pull/40.diff","patch_url":"https://github.com/acquaman/AcquamanDataServer/pull/40.patch","issue_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/issues/40","number":40,"state":"open","locked":false,"title":"PullRequst for Issue6: Server App crashed when sending request from TCPClient","user":{"login":"XuetaoLiu-CLS","id":8292610,"avatar_url":"https://avatars.githubusercontent.com/u/8292610?v=3","gravatar_id":"","url":"https://api.github.com/users/XuetaoLiu-CLS","html_url":"https://github.com/XuetaoLiu-CLS","followers_url":"https://api.github.com/users/XuetaoLiu-CLS/followers","following_url":"https://api.github.com/users/XuetaoLiu-CLS/following{/other_user}","gists_url":"https://api.github.com/users/XuetaoLiu-CLS/gists{/gist_id}","starred_url":"https://api.github.com/users/XuetaoLiu-CLS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XuetaoLiu-CLS/subscriptions","organizations_url":"https://api.github.com/users/XuetaoLiu-CLS/orgs","repos_url":"https://api.github.com/users/XuetaoLiu-CLS/repos","events_url":"https://api.github.com/users/XuetaoLiu-CLS/events{/privacy}","received_events_url":"https://api.github.com/users/XuetaoLiu-CLS/received_events","type":"User","site_admin":false},"body":"https://github.com/acquaman/AcquamanDataServer/issues/6\r\n\r\nThe crash is caused by the empty count field sent from the TCPClient.\r\n\r\nSolution:\r\n  - Added a protection in the server app, if no data field, the request will be ignored\r\n  - for StartTime + Count request type, if count is not provided, default it as 1.\r\n\r\n---\r\nNote: \r\nThis pull request is based on Branch Issue38, which should be reviewed first.","created_at":"2015-07-07T22:28:12Z","updated_at":"2015-07-21T17:19:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b56c70203cfe8f6d64b3cb042bf524c71484b642","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/pulls/40/commits","review_comments_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/pulls/40/comments","review_comment_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/issues/40/comments","statuses_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/statuses/d96c4c51cdd46361cb988451b91d9aaba7d94d90","head":{"label":"acquaman:Issue6","ref":"Issue6","sha":"d96c4c51cdd46361cb988451b91d9aaba7d94d90","user":{"login":"acquaman","id":602716,"avatar_url":"https://avatars.githubusercontent.com/u/602716?v=3","gravatar_id":"","url":"https://api.github.com/users/acquaman","html_url":"https://github.com/acquaman","followers_url":"https://api.github.com/users/acquaman/followers","following_url":"https://api.github.com/users/acquaman/following{/other_user}","gists_url":"https://api.github.com/users/acquaman/gists{/gist_id}","starred_url":"https://api.github.com/users/acquaman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acquaman/subscriptions","organizations_url":"https://api.github.com/users/acquaman/orgs","repos_url":"https://api.github.com/users/acquaman/repos","events_url":"https://api.github.com/users/acquaman/events{/privacy}","received_events_url":"https://api.github.com/users/acquaman/received_events","type":"Organization","site_admin":false},"repo":{"id":37996517,"name":"AcquamanDataServer","full_name":"acquaman/AcquamanDataServer","owner":{"login":"acquaman","id":602716,"avatar_url":"https://avatars.githubusercontent.com/u/602716?v=3","gravatar_id":"","url":"https://api.github.com/users/acquaman","html_url":"https://github.com/acquaman","followers_url":"https://api.github.com/users/acquaman/followers","following_url":"https://api.github.com/users/acquaman/following{/other_user}","gists_url":"https://api.github.com/users/acquaman/gists{/gist_id}","starred_url":"https://api.github.com/users/acquaman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acquaman/subscriptions","organizations_url":"https://api.github.com/users/acquaman/orgs","repos_url":"https://api.github.com/users/acquaman/repos","events_url":"https://api.github.com/users/acquaman/events{/privacy}","received_events_url":"https://api.github.com/users/acquaman/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/acquaman/AcquamanDataServer","description":"Server architecture to provide a network and storage efficient data cache","fork":false,"url":"https://api.github.com/repos/acquaman/AcquamanDataServer","forks_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/forks","keys_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/teams","hooks_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/hooks","issue_events_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/issues/events{/number}","events_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/events","assignees_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/assignees{/user}","branches_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/branches{/branch}","tags_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/tags","blobs_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/git/refs{/sha}","trees_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/statuses/{sha}","languages_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/languages","stargazers_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/stargazers","contributors_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/contributors","subscribers_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/subscribers","subscription_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/subscription","commits_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/commits{/sha}","git_commits_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/git/commits{/sha}","comments_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/comments{/number}","issue_comment_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/issues/comments{/number}","contents_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/contents/{+path}","compare_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/merges","archive_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/downloads","issues_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/issues{/number}","pulls_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/pulls{/number}","milestones_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/milestones{/number}","notifications_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/labels{/name}","releases_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/releases{/id}","created_at":"2015-06-24T16:27:18Z","updated_at":"2015-07-21T14:39:58Z","pushed_at":"2015-07-21T17:17:19Z","git_url":"git://github.com/acquaman/AcquamanDataServer.git","ssh_url":"git@github.com:acquaman/AcquamanDataServer.git","clone_url":"https://github.com/acquaman/AcquamanDataServer.git","svn_url":"https://github.com/acquaman/AcquamanDataServer","homepage":"","size":364,"stargazers_count":2,"watchers_count":2,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":33,"forks":0,"open_issues":33,"watchers":2,"default_branch":"master"}},"base":{"label":"acquaman:master","ref":"master","sha":"a344e6fe2a4d87a3e23d41bdadf25e19bd83e698","user":{"login":"acquaman","id":602716,"avatar_url":"https://avatars.githubusercontent.com/u/602716?v=3","gravatar_id":"","url":"https://api.github.com/users/acquaman","html_url":"https://github.com/acquaman","followers_url":"https://api.github.com/users/acquaman/followers","following_url":"https://api.github.com/users/acquaman/following{/other_user}","gists_url":"https://api.github.com/users/acquaman/gists{/gist_id}","starred_url":"https://api.github.com/users/acquaman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acquaman/subscriptions","organizations_url":"https://api.github.com/users/acquaman/orgs","repos_url":"https://api.github.com/users/acquaman/repos","events_url":"https://api.github.com/users/acquaman/events{/privacy}","received_events_url":"https://api.github.com/users/acquaman/received_events","type":"Organization","site_admin":false},"repo":{"id":37996517,"name":"AcquamanDataServer","full_name":"acquaman/AcquamanDataServer","owner":{"login":"acquaman","id":602716,"avatar_url":"https://avatars.githubusercontent.com/u/602716?v=3","gravatar_id":"","url":"https://api.github.com/users/acquaman","html_url":"https://github.com/acquaman","followers_url":"https://api.github.com/users/acquaman/followers","following_url":"https://api.github.com/users/acquaman/following{/other_user}","gists_url":"https://api.github.com/users/acquaman/gists{/gist_id}","starred_url":"https://api.github.com/users/acquaman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acquaman/subscriptions","organizations_url":"https://api.github.com/users/acquaman/orgs","repos_url":"https://api.github.com/users/acquaman/repos","events_url":"https://api.github.com/users/acquaman/events{/privacy}","received_events_url":"https://api.github.com/users/acquaman/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/acquaman/AcquamanDataServer","description":"Server architecture to provide a network and storage efficient data cache","fork":false,"url":"https://api.github.com/repos/acquaman/AcquamanDataServer","forks_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/forks","keys_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/teams","hooks_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/hooks","issue_events_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/issues/events{/number}","events_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/events","assignees_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/assignees{/user}","branches_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/branches{/branch}","tags_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/tags","blobs_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/git/refs{/sha}","trees_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/statuses/{sha}","languages_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/languages","stargazers_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/stargazers","contributors_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/contributors","subscribers_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/subscribers","subscription_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/subscription","commits_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/commits{/sha}","git_commits_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/git/commits{/sha}","comments_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/comments{/number}","issue_comment_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/issues/comments{/number}","contents_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/contents/{+path}","compare_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/merges","archive_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/downloads","issues_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/issues{/number}","pulls_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/pulls{/number}","milestones_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/milestones{/number}","notifications_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/labels{/name}","releases_url":"https://api.github.com/repos/acquaman/AcquamanDataServer/releases{/id}","created_at":"2015-06-24T16:27:18Z","updated_at":"2015-07-21T14:39:58Z","pushed_at":"2015-07-21T17:17:19Z","git_url":"git://github.com/acquaman/AcquamanDataServer.git","ssh_url":"git@github.com:acquaman/AcquamanDataServer.git","clone_url":"https://github.com/acquaman/AcquamanDataServer.git","svn_url":"https://github.com/acquaman/AcquamanDataServer","homepage":"","size":364,"stargazers_count":2,"watchers_count":2,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":33,"forks":0,"open_issues":33,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/acquaman/AcquamanDataServer/pulls/40"},"html":{"href":"https://github.com/acquaman/AcquamanDataServer/pull/40"},"issue":{"href":"https://api.github.com/repos/acquaman/AcquamanDataServer/issues/40"},"comments":{"href":"https://api.github.com/repos/acquaman/AcquamanDataServer/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/acquaman/AcquamanDataServer/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/acquaman/AcquamanDataServer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/acquaman/AcquamanDataServer/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/acquaman/AcquamanDataServer/statuses/d96c4c51cdd46361cb988451b91d9aaba7d94d90"}}}}