{"action":"created","comment":{"url":"https://api.github.com/repos/jeelabs/esp-link/pulls/comments/85667143","pull_request_review_id":6369823,"id":85667143,"diff_hunk":"@@ -0,0 +1,85 @@\n+#include <esp8266.h>\n+#include \"cgi.h\"\n+#include \"config.h\"\n+#include \"serbridge.h\"\n+\n+// Cgi to return choice of Telnet ports\n+int ICACHE_FLASH_ATTR cgiTelnetGet(HttpdConnData *connData) {\n+  if (connData->conn==NULL) return HTTPD_CGI_DONE; // Connection aborted\n+\n+  char buff[1024];\n+  int len;\n+  \n+  os_printf(\"Current telnet ports: port1=%d port2=%d\\n\",\n+\tflashConfig.telnet_port1, flashConfig.telnet_port2);\n+\t\n+  len = os_sprintf(buff,\n+      \"{ \\\"port1\\\": \\\"%d\\\", \\\"port2\\\": \\\"%d\\\" }\",\n+      flashConfig.telnet_port1, flashConfig.telnet_port2);\n+\n+  jsonHeader(connData, 200);\n+  httpdSend(connData, buff, len);\n+  return HTTPD_CGI_DONE;\n+}\n+\n+// Cgi to change choice of Telnet ports\n+int ICACHE_FLASH_ATTR cgiTelnetSet(HttpdConnData *connData) {\n+  if (connData->conn==NULL) {\n+    return HTTPD_CGI_DONE; // Connection aborted\n+  }\n+\t\n+  char *coll;\n+  int8_t ok = 0;\n+  uint16_t port1, port2;\n+  ok |= getUInt16Arg(connData, \"port1\", &port1);\n+  ok |= getUInt16Arg(connData, \"port2\", &port2);\n+  if (ok < 0) { coll = \"Failed to fetch ports. Are they valid?\"; goto collision; }","path":"esp-link/cgitelnet.c","position":36,"original_position":36,"commit_id":"7d605209c91d7bfedd9f682e7b67e231bce307ed","original_commit_id":"7d605209c91d7bfedd9f682e7b67e231bce307ed","user":{"login":"tve","id":39480,"avatar_url":"https://avatars.githubusercontent.com/u/39480?v=3","gravatar_id":"","url":"https://api.github.com/users/tve","html_url":"https://github.com/tve","followers_url":"https://api.github.com/users/tve/followers","following_url":"https://api.github.com/users/tve/following{/other_user}","gists_url":"https://api.github.com/users/tve/gists{/gist_id}","starred_url":"https://api.github.com/users/tve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tve/subscriptions","organizations_url":"https://api.github.com/users/tve/orgs","repos_url":"https://api.github.com/users/tve/repos","events_url":"https://api.github.com/users/tve/events{/privacy}","received_events_url":"https://api.github.com/users/tve/received_events","type":"User","site_admin":false},"body":"no problem. I should go through the whole code and see where I can push constant strings into flash. Can never have too much memory on this thing...","created_at":"2016-10-30T19:33:01Z","updated_at":"2016-10-30T19:33:01Z","html_url":"https://github.com/jeelabs/esp-link/pull/205#discussion_r85667143","pull_request_url":"https://api.github.com/repos/jeelabs/esp-link/pulls/205","_links":{"self":{"href":"https://api.github.com/repos/jeelabs/esp-link/pulls/comments/85667143"},"html":{"href":"https://github.com/jeelabs/esp-link/pull/205#discussion_r85667143"},"pull_request":{"href":"https://api.github.com/repos/jeelabs/esp-link/pulls/205"}}},"pull_request":{"url":"https://api.github.com/repos/jeelabs/esp-link/pulls/205","id":91288503,"html_url":"https://github.com/jeelabs/esp-link/pull/205","diff_url":"https://github.com/jeelabs/esp-link/pull/205.diff","patch_url":"https://github.com/jeelabs/esp-link/pull/205.patch","issue_url":"https://api.github.com/repos/jeelabs/esp-link/issues/205","number":205,"state":"open","locked":false,"title":"Variable TCP Telnet ports via web interface","user":{"login":"fuzzball03","id":5809716,"avatar_url":"https://avatars.githubusercontent.com/u/5809716?v=3","gravatar_id":"","url":"https://api.github.com/users/fuzzball03","html_url":"https://github.com/fuzzball03","followers_url":"https://api.github.com/users/fuzzball03/followers","following_url":"https://api.github.com/users/fuzzball03/following{/other_user}","gists_url":"https://api.github.com/users/fuzzball03/gists{/gist_id}","starred_url":"https://api.github.com/users/fuzzball03/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fuzzball03/subscriptions","organizations_url":"https://api.github.com/users/fuzzball03/orgs","repos_url":"https://api.github.com/users/fuzzball03/repos","events_url":"https://api.github.com/users/fuzzball03/events{/privacy}","received_events_url":"https://api.github.com/users/fuzzball03/received_events","type":"User","site_admin":false},"body":"Per issue #167 ... Here ya go, first attempt, untested.\r\nSpent an hour or so at work on this today...\r\n\r\nI've only done really simple C coding, this will be my first that consists of multiple headers.\r\nPlease be easy on me - CONSTRUCTIVE CRITICISM WELCOME.\r\n\r\nNote - this is untested.","created_at":"2016-10-27T21:58:46Z","updated_at":"2016-10-30T19:33:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fe4a7c567b94c4ced18f1f0bd837ff5de5c39c63","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jeelabs/esp-link/pulls/205/commits","review_comments_url":"https://api.github.com/repos/jeelabs/esp-link/pulls/205/comments","review_comment_url":"https://api.github.com/repos/jeelabs/esp-link/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jeelabs/esp-link/issues/205/comments","statuses_url":"https://api.github.com/repos/jeelabs/esp-link/statuses/7d605209c91d7bfedd9f682e7b67e231bce307ed","head":{"label":"fuzzball03:master","ref":"master","sha":"7d605209c91d7bfedd9f682e7b67e231bce307ed","user":{"login":"fuzzball03","id":5809716,"avatar_url":"https://avatars.githubusercontent.com/u/5809716?v=3","gravatar_id":"","url":"https://api.github.com/users/fuzzball03","html_url":"https://github.com/fuzzball03","followers_url":"https://api.github.com/users/fuzzball03/followers","following_url":"https://api.github.com/users/fuzzball03/following{/other_user}","gists_url":"https://api.github.com/users/fuzzball03/gists{/gist_id}","starred_url":"https://api.github.com/users/fuzzball03/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fuzzball03/subscriptions","organizations_url":"https://api.github.com/users/fuzzball03/orgs","repos_url":"https://api.github.com/users/fuzzball03/repos","events_url":"https://api.github.com/users/fuzzball03/events{/privacy}","received_events_url":"https://api.github.com/users/fuzzball03/received_events","type":"User","site_admin":false},"repo":{"id":72141841,"name":"esp-link","full_name":"fuzzball03/esp-link","owner":{"login":"fuzzball03","id":5809716,"avatar_url":"https://avatars.githubusercontent.com/u/5809716?v=3","gravatar_id":"","url":"https://api.github.com/users/fuzzball03","html_url":"https://github.com/fuzzball03","followers_url":"https://api.github.com/users/fuzzball03/followers","following_url":"https://api.github.com/users/fuzzball03/following{/other_user}","gists_url":"https://api.github.com/users/fuzzball03/gists{/gist_id}","starred_url":"https://api.github.com/users/fuzzball03/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fuzzball03/subscriptions","organizations_url":"https://api.github.com/users/fuzzball03/orgs","repos_url":"https://api.github.com/users/fuzzball03/repos","events_url":"https://api.github.com/users/fuzzball03/events{/privacy}","received_events_url":"https://api.github.com/users/fuzzball03/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fuzzball03/esp-link","description":"esp8266 wifi-serial bridge, outbound TCP, and arduino/AVR/LPC/NXP programmer","fork":true,"url":"https://api.github.com/repos/fuzzball03/esp-link","forks_url":"https://api.github.com/repos/fuzzball03/esp-link/forks","keys_url":"https://api.github.com/repos/fuzzball03/esp-link/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fuzzball03/esp-link/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fuzzball03/esp-link/teams","hooks_url":"https://api.github.com/repos/fuzzball03/esp-link/hooks","issue_events_url":"https://api.github.com/repos/fuzzball03/esp-link/issues/events{/number}","events_url":"https://api.github.com/repos/fuzzball03/esp-link/events","assignees_url":"https://api.github.com/repos/fuzzball03/esp-link/assignees{/user}","branches_url":"https://api.github.com/repos/fuzzball03/esp-link/branches{/branch}","tags_url":"https://api.github.com/repos/fuzzball03/esp-link/tags","blobs_url":"https://api.github.com/repos/fuzzball03/esp-link/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fuzzball03/esp-link/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fuzzball03/esp-link/git/refs{/sha}","trees_url":"https://api.github.com/repos/fuzzball03/esp-link/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fuzzball03/esp-link/statuses/{sha}","languages_url":"https://api.github.com/repos/fuzzball03/esp-link/languages","stargazers_url":"https://api.github.com/repos/fuzzball03/esp-link/stargazers","contributors_url":"https://api.github.com/repos/fuzzball03/esp-link/contributors","subscribers_url":"https://api.github.com/repos/fuzzball03/esp-link/subscribers","subscription_url":"https://api.github.com/repos/fuzzball03/esp-link/subscription","commits_url":"https://api.github.com/repos/fuzzball03/esp-link/commits{/sha}","git_commits_url":"https://api.github.com/repos/fuzzball03/esp-link/git/commits{/sha}","comments_url":"https://api.github.com/repos/fuzzball03/esp-link/comments{/number}","issue_comment_url":"https://api.github.com/repos/fuzzball03/esp-link/issues/comments{/number}","contents_url":"https://api.github.com/repos/fuzzball03/esp-link/contents/{+path}","compare_url":"https://api.github.com/repos/fuzzball03/esp-link/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fuzzball03/esp-link/merges","archive_url":"https://api.github.com/repos/fuzzball03/esp-link/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fuzzball03/esp-link/downloads","issues_url":"https://api.github.com/repos/fuzzball03/esp-link/issues{/number}","pulls_url":"https://api.github.com/repos/fuzzball03/esp-link/pulls{/number}","milestones_url":"https://api.github.com/repos/fuzzball03/esp-link/milestones{/number}","notifications_url":"https://api.github.com/repos/fuzzball03/esp-link/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fuzzball03/esp-link/labels{/name}","releases_url":"https://api.github.com/repos/fuzzball03/esp-link/releases{/id}","deployments_url":"https://api.github.com/repos/fuzzball03/esp-link/deployments","created_at":"2016-10-27T19:38:00Z","updated_at":"2016-10-27T19:38:01Z","pushed_at":"2016-10-28T19:42:32Z","git_url":"git://github.com/fuzzball03/esp-link.git","ssh_url":"git@github.com:fuzzball03/esp-link.git","clone_url":"https://github.com/fuzzball03/esp-link.git","svn_url":"https://github.com/fuzzball03/esp-link","homepage":"","size":2818,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jeelabs:master","ref":"master","sha":"d0377bdf25539fdbfc542f9b2a213918320b5cbe","user":{"login":"jeelabs","id":9609626,"avatar_url":"https://avatars.githubusercontent.com/u/9609626?v=3","gravatar_id":"","url":"https://api.github.com/users/jeelabs","html_url":"https://github.com/jeelabs","followers_url":"https://api.github.com/users/jeelabs/followers","following_url":"https://api.github.com/users/jeelabs/following{/other_user}","gists_url":"https://api.github.com/users/jeelabs/gists{/gist_id}","starred_url":"https://api.github.com/users/jeelabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeelabs/subscriptions","organizations_url":"https://api.github.com/users/jeelabs/orgs","repos_url":"https://api.github.com/users/jeelabs/repos","events_url":"https://api.github.com/users/jeelabs/events{/privacy}","received_events_url":"https://api.github.com/users/jeelabs/received_events","type":"Organization","site_admin":false},"repo":{"id":35730046,"name":"esp-link","full_name":"jeelabs/esp-link","owner":{"login":"jeelabs","id":9609626,"avatar_url":"https://avatars.githubusercontent.com/u/9609626?v=3","gravatar_id":"","url":"https://api.github.com/users/jeelabs","html_url":"https://github.com/jeelabs","followers_url":"https://api.github.com/users/jeelabs/followers","following_url":"https://api.github.com/users/jeelabs/following{/other_user}","gists_url":"https://api.github.com/users/jeelabs/gists{/gist_id}","starred_url":"https://api.github.com/users/jeelabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeelabs/subscriptions","organizations_url":"https://api.github.com/users/jeelabs/orgs","repos_url":"https://api.github.com/users/jeelabs/repos","events_url":"https://api.github.com/users/jeelabs/events{/privacy}","received_events_url":"https://api.github.com/users/jeelabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jeelabs/esp-link","description":"esp8266 wifi-serial bridge, outbound TCP, and arduino/AVR/LPC/NXP programmer","fork":false,"url":"https://api.github.com/repos/jeelabs/esp-link","forks_url":"https://api.github.com/repos/jeelabs/esp-link/forks","keys_url":"https://api.github.com/repos/jeelabs/esp-link/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jeelabs/esp-link/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jeelabs/esp-link/teams","hooks_url":"https://api.github.com/repos/jeelabs/esp-link/hooks","issue_events_url":"https://api.github.com/repos/jeelabs/esp-link/issues/events{/number}","events_url":"https://api.github.com/repos/jeelabs/esp-link/events","assignees_url":"https://api.github.com/repos/jeelabs/esp-link/assignees{/user}","branches_url":"https://api.github.com/repos/jeelabs/esp-link/branches{/branch}","tags_url":"https://api.github.com/repos/jeelabs/esp-link/tags","blobs_url":"https://api.github.com/repos/jeelabs/esp-link/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jeelabs/esp-link/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jeelabs/esp-link/git/refs{/sha}","trees_url":"https://api.github.com/repos/jeelabs/esp-link/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jeelabs/esp-link/statuses/{sha}","languages_url":"https://api.github.com/repos/jeelabs/esp-link/languages","stargazers_url":"https://api.github.com/repos/jeelabs/esp-link/stargazers","contributors_url":"https://api.github.com/repos/jeelabs/esp-link/contributors","subscribers_url":"https://api.github.com/repos/jeelabs/esp-link/subscribers","subscription_url":"https://api.github.com/repos/jeelabs/esp-link/subscription","commits_url":"https://api.github.com/repos/jeelabs/esp-link/commits{/sha}","git_commits_url":"https://api.github.com/repos/jeelabs/esp-link/git/commits{/sha}","comments_url":"https://api.github.com/repos/jeelabs/esp-link/comments{/number}","issue_comment_url":"https://api.github.com/repos/jeelabs/esp-link/issues/comments{/number}","contents_url":"https://api.github.com/repos/jeelabs/esp-link/contents/{+path}","compare_url":"https://api.github.com/repos/jeelabs/esp-link/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jeelabs/esp-link/merges","archive_url":"https://api.github.com/repos/jeelabs/esp-link/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jeelabs/esp-link/downloads","issues_url":"https://api.github.com/repos/jeelabs/esp-link/issues{/number}","pulls_url":"https://api.github.com/repos/jeelabs/esp-link/pulls{/number}","milestones_url":"https://api.github.com/repos/jeelabs/esp-link/milestones{/number}","notifications_url":"https://api.github.com/repos/jeelabs/esp-link/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jeelabs/esp-link/labels{/name}","releases_url":"https://api.github.com/repos/jeelabs/esp-link/releases{/id}","deployments_url":"https://api.github.com/repos/jeelabs/esp-link/deployments","created_at":"2015-05-16T15:58:33Z","updated_at":"2016-10-30T18:56:25Z","pushed_at":"2016-10-30T16:37:33Z","git_url":"git://github.com/jeelabs/esp-link.git","ssh_url":"git@github.com:jeelabs/esp-link.git","clone_url":"https://github.com/jeelabs/esp-link.git","svn_url":"https://github.com/jeelabs/esp-link","homepage":"","size":3226,"stargazers_count":633,"watchers_count":633,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":164,"mirror_url":null,"open_issues_count":38,"forks":164,"open_issues":38,"watchers":633,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jeelabs/esp-link/pulls/205"},"html":{"href":"https://github.com/jeelabs/esp-link/pull/205"},"issue":{"href":"https://api.github.com/repos/jeelabs/esp-link/issues/205"},"comments":{"href":"https://api.github.com/repos/jeelabs/esp-link/issues/205/comments"},"review_comments":{"href":"https://api.github.com/repos/jeelabs/esp-link/pulls/205/comments"},"review_comment":{"href":"https://api.github.com/repos/jeelabs/esp-link/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jeelabs/esp-link/pulls/205/commits"},"statuses":{"href":"https://api.github.com/repos/jeelabs/esp-link/statuses/7d605209c91d7bfedd9f682e7b67e231bce307ed"}}}}
{"actor":{"display_login":"tve"}}