{"action":"created","comment":{"url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/pulls/comments/61829975","id":61829975,"diff_hunk":"@@ -71,16 +73,58 @@ static void cmd_failure(const char *cmd_name, const char *msg)\n }\n \n /**\n+ * Callback that gets invoked when we are unable to handle the URC using\n+ * the standard URC callbacks.  Used for the silly messages like\n+ * `0,CONNECT` where there is no prefix for the URC like their should be.\n+ * Messages this callback handles:\n+ * * <0-4>,CONNECT\n+ * * <0-4>,CLOSED\n+ * * WIFI DISCONNECT\n+ */\n+static bool sparse_urc_cb(char* msg)\n+{\n+        msg = strip_inline(msg);\n+\n+        if (STR_EQ(msg, \"WIFI DISCONNECT\")) {\n+                if (state.hooks.client_wifi_disconnect_cb)\n+                        state.hooks.client_wifi_disconnect_cb();\n+                return true;\n+        }\n+\n+        /* Now look for a message with a comma */\n+        char* comma = strchr(msg, ',');\n+        if (!comma)\n+                return false;\n+\n+        *comma = '\\0';\n+        const char* m1 = msg;\n+        const char* m2 = ++comma;\n+        if (STR_EQ(m2, \"CONNECT\")) {","path":"src/devices/esp8266.c","position":46,"original_position":46,"commit_id":"569e10c722354758929d8c1dc266d2241d5dbbb6","original_commit_id":"569e10c722354758929d8c1dc266d2241d5dbbb6","user":{"login":"stieg","id":141519,"avatar_url":"https://avatars.githubusercontent.com/u/141519?v=3","gravatar_id":"","url":"https://api.github.com/users/stieg","html_url":"https://github.com/stieg","followers_url":"https://api.github.com/users/stieg/followers","following_url":"https://api.github.com/users/stieg/following{/other_user}","gists_url":"https://api.github.com/users/stieg/gists{/gist_id}","starred_url":"https://api.github.com/users/stieg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stieg/subscriptions","organizations_url":"https://api.github.com/users/stieg/orgs","repos_url":"https://api.github.com/users/stieg/repos","events_url":"https://api.github.com/users/stieg/events{/privacy}","received_events_url":"https://api.github.com/users/stieg/received_events","type":"User","site_admin":false},"body":"Yep.","created_at":"2016-05-03T01:24:34Z","updated_at":"2016-05-03T01:24:34Z","html_url":"https://github.com/autosportlabs/RaceCapture-Pro_firmware/pull/554#discussion_r61829975","pull_request_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/pulls/554","_links":{"self":{"href":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/pulls/comments/61829975"},"html":{"href":"https://github.com/autosportlabs/RaceCapture-Pro_firmware/pull/554#discussion_r61829975"},"pull_request":{"href":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/pulls/554"}}},"pull_request":{"url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/pulls/554","id":68620031,"html_url":"https://github.com/autosportlabs/RaceCapture-Pro_firmware/pull/554","diff_url":"https://github.com/autosportlabs/RaceCapture-Pro_firmware/pull/554.diff","patch_url":"https://github.com/autosportlabs/RaceCapture-Pro_firmware/pull/554.patch","issue_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/issues/554","number":554,"state":"open","locked":false,"title":"Add hooks for the poorly designed ESP8266 URC AT msgs","user":{"login":"stieg","id":141519,"avatar_url":"https://avatars.githubusercontent.com/u/141519?v=3","gravatar_id":"","url":"https://api.github.com/users/stieg","html_url":"https://github.com/stieg","followers_url":"https://api.github.com/users/stieg/followers","following_url":"https://api.github.com/users/stieg/following{/other_user}","gists_url":"https://api.github.com/users/stieg/gists{/gist_id}","starred_url":"https://api.github.com/users/stieg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stieg/subscriptions","organizations_url":"https://api.github.com/users/stieg/orgs","repos_url":"https://api.github.com/users/stieg/repos","events_url":"https://api.github.com/users/stieg/events{/privacy}","received_events_url":"https://api.github.com/users/stieg/received_events","type":"User","site_admin":false},"body":"There are a few URC messages that we need to process to maintain internal stability that aren't presented in a proper AT URC fashion.  They are more along the lines like the modem blurting out what happening when it happens instead of being civil.  In example the modem will blurt out `3,CONNECTED` when a new connection is opened on port 3.  I can't easily handle these with the URC handler because that depends on a prefix (like `+IPD:`, which is the prefix seen for incoming data URCs).  So this creates a generic URC handler and we define a method to process these URCs and call the appropriate hook methods to ensure things are set correctly.","created_at":"2016-05-02T20:55:59Z","updated_at":"2016-05-03T01:24:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"27a37b8867f9b479f9fa815fb10ae0d4187d53e7","assignee":{"login":"brentpicasso","id":3267533,"avatar_url":"https://avatars.githubusercontent.com/u/3267533?v=3","gravatar_id":"","url":"https://api.github.com/users/brentpicasso","html_url":"https://github.com/brentpicasso","followers_url":"https://api.github.com/users/brentpicasso/followers","following_url":"https://api.github.com/users/brentpicasso/following{/other_user}","gists_url":"https://api.github.com/users/brentpicasso/gists{/gist_id}","starred_url":"https://api.github.com/users/brentpicasso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brentpicasso/subscriptions","organizations_url":"https://api.github.com/users/brentpicasso/orgs","repos_url":"https://api.github.com/users/brentpicasso/repos","events_url":"https://api.github.com/users/brentpicasso/events{/privacy}","received_events_url":"https://api.github.com/users/brentpicasso/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/milestones/10","html_url":"https://github.com/autosportlabs/RaceCapture-Pro_firmware/milestones/2.10.0","labels_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/milestones/10/labels","id":1578425,"number":10,"title":"2.10.0","description":"Next new feature release.","creator":{"login":"stieg","id":141519,"avatar_url":"https://avatars.githubusercontent.com/u/141519?v=3","gravatar_id":"","url":"https://api.github.com/users/stieg","html_url":"https://github.com/stieg","followers_url":"https://api.github.com/users/stieg/followers","following_url":"https://api.github.com/users/stieg/following{/other_user}","gists_url":"https://api.github.com/users/stieg/gists{/gist_id}","starred_url":"https://api.github.com/users/stieg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stieg/subscriptions","organizations_url":"https://api.github.com/users/stieg/orgs","repos_url":"https://api.github.com/users/stieg/repos","events_url":"https://api.github.com/users/stieg/events{/privacy}","received_events_url":"https://api.github.com/users/stieg/received_events","type":"User","site_admin":false},"open_issues":24,"closed_issues":8,"state":"open","created_at":"2016-02-11T20:22:49Z","updated_at":"2016-05-02T20:55:59Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/pulls/554/commits","review_comments_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/pulls/554/comments","review_comment_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/pulls/comments{/number}","comments_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/issues/554/comments","statuses_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/statuses/569e10c722354758929d8c1dc266d2241d5dbbb6","head":{"label":"autosportlabs:p/stieg/fix_no_timeout_tx_can","ref":"p/stieg/fix_no_timeout_tx_can","sha":"569e10c722354758929d8c1dc266d2241d5dbbb6","user":{"login":"autosportlabs","id":1274125,"avatar_url":"https://avatars.githubusercontent.com/u/1274125?v=3","gravatar_id":"","url":"https://api.github.com/users/autosportlabs","html_url":"https://github.com/autosportlabs","followers_url":"https://api.github.com/users/autosportlabs/followers","following_url":"https://api.github.com/users/autosportlabs/following{/other_user}","gists_url":"https://api.github.com/users/autosportlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/autosportlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autosportlabs/subscriptions","organizations_url":"https://api.github.com/users/autosportlabs/orgs","repos_url":"https://api.github.com/users/autosportlabs/repos","events_url":"https://api.github.com/users/autosportlabs/events{/privacy}","received_events_url":"https://api.github.com/users/autosportlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":10069490,"name":"RaceCapture-Pro_firmware","full_name":"autosportlabs/RaceCapture-Pro_firmware","owner":{"login":"autosportlabs","id":1274125,"avatar_url":"https://avatars.githubusercontent.com/u/1274125?v=3","gravatar_id":"","url":"https://api.github.com/users/autosportlabs","html_url":"https://github.com/autosportlabs","followers_url":"https://api.github.com/users/autosportlabs/followers","following_url":"https://api.github.com/users/autosportlabs/following{/other_user}","gists_url":"https://api.github.com/users/autosportlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/autosportlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autosportlabs/subscriptions","organizations_url":"https://api.github.com/users/autosportlabs/orgs","repos_url":"https://api.github.com/users/autosportlabs/repos","events_url":"https://api.github.com/users/autosportlabs/events{/privacy}","received_events_url":"https://api.github.com/users/autosportlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/autosportlabs/RaceCapture-Pro_firmware","description":"Firmware for RaceCapture-Pro Data Acquisition, control and Telemetry system for motorsports","fork":false,"url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware","forks_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/forks","keys_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/teams","hooks_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/hooks","issue_events_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/issues/events{/number}","events_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/events","assignees_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/assignees{/user}","branches_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/branches{/branch}","tags_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/tags","blobs_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/git/refs{/sha}","trees_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/statuses/{sha}","languages_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/languages","stargazers_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/stargazers","contributors_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/contributors","subscribers_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/subscribers","subscription_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/subscription","commits_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/commits{/sha}","git_commits_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/git/commits{/sha}","comments_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/comments{/number}","issue_comment_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/issues/comments{/number}","contents_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/contents/{+path}","compare_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/merges","archive_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/downloads","issues_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/issues{/number}","pulls_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/pulls{/number}","milestones_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/milestones{/number}","notifications_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/labels{/name}","releases_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/releases{/id}","deployments_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/deployments","created_at":"2013-05-15T02:30:10Z","updated_at":"2016-04-12T00:05:19Z","pushed_at":"2016-05-03T01:04:42Z","git_url":"git://github.com/autosportlabs/RaceCapture-Pro_firmware.git","ssh_url":"git@github.com:autosportlabs/RaceCapture-Pro_firmware.git","clone_url":"https://github.com/autosportlabs/RaceCapture-Pro_firmware.git","svn_url":"https://github.com/autosportlabs/RaceCapture-Pro_firmware","homepage":null,"size":24751,"stargazers_count":17,"watchers_count":17,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":136,"forks":13,"open_issues":136,"watchers":17,"default_branch":"master"}},"base":{"label":"autosportlabs:r/2.10.0","ref":"r/2.10.0","sha":"72784d48bf3d6b5bae7c89a5e2e2ac59df0a77e0","user":{"login":"autosportlabs","id":1274125,"avatar_url":"https://avatars.githubusercontent.com/u/1274125?v=3","gravatar_id":"","url":"https://api.github.com/users/autosportlabs","html_url":"https://github.com/autosportlabs","followers_url":"https://api.github.com/users/autosportlabs/followers","following_url":"https://api.github.com/users/autosportlabs/following{/other_user}","gists_url":"https://api.github.com/users/autosportlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/autosportlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autosportlabs/subscriptions","organizations_url":"https://api.github.com/users/autosportlabs/orgs","repos_url":"https://api.github.com/users/autosportlabs/repos","events_url":"https://api.github.com/users/autosportlabs/events{/privacy}","received_events_url":"https://api.github.com/users/autosportlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":10069490,"name":"RaceCapture-Pro_firmware","full_name":"autosportlabs/RaceCapture-Pro_firmware","owner":{"login":"autosportlabs","id":1274125,"avatar_url":"https://avatars.githubusercontent.com/u/1274125?v=3","gravatar_id":"","url":"https://api.github.com/users/autosportlabs","html_url":"https://github.com/autosportlabs","followers_url":"https://api.github.com/users/autosportlabs/followers","following_url":"https://api.github.com/users/autosportlabs/following{/other_user}","gists_url":"https://api.github.com/users/autosportlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/autosportlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autosportlabs/subscriptions","organizations_url":"https://api.github.com/users/autosportlabs/orgs","repos_url":"https://api.github.com/users/autosportlabs/repos","events_url":"https://api.github.com/users/autosportlabs/events{/privacy}","received_events_url":"https://api.github.com/users/autosportlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/autosportlabs/RaceCapture-Pro_firmware","description":"Firmware for RaceCapture-Pro Data Acquisition, control and Telemetry system for motorsports","fork":false,"url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware","forks_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/forks","keys_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/teams","hooks_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/hooks","issue_events_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/issues/events{/number}","events_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/events","assignees_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/assignees{/user}","branches_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/branches{/branch}","tags_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/tags","blobs_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/git/refs{/sha}","trees_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/statuses/{sha}","languages_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/languages","stargazers_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/stargazers","contributors_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/contributors","subscribers_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/subscribers","subscription_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/subscription","commits_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/commits{/sha}","git_commits_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/git/commits{/sha}","comments_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/comments{/number}","issue_comment_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/issues/comments{/number}","contents_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/contents/{+path}","compare_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/merges","archive_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/downloads","issues_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/issues{/number}","pulls_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/pulls{/number}","milestones_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/milestones{/number}","notifications_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/labels{/name}","releases_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/releases{/id}","deployments_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/deployments","created_at":"2013-05-15T02:30:10Z","updated_at":"2016-04-12T00:05:19Z","pushed_at":"2016-05-03T01:04:42Z","git_url":"git://github.com/autosportlabs/RaceCapture-Pro_firmware.git","ssh_url":"git@github.com:autosportlabs/RaceCapture-Pro_firmware.git","clone_url":"https://github.com/autosportlabs/RaceCapture-Pro_firmware.git","svn_url":"https://github.com/autosportlabs/RaceCapture-Pro_firmware","homepage":null,"size":24751,"stargazers_count":17,"watchers_count":17,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":136,"forks":13,"open_issues":136,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/pulls/554"},"html":{"href":"https://github.com/autosportlabs/RaceCapture-Pro_firmware/pull/554"},"issue":{"href":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/issues/554"},"comments":{"href":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/issues/554/comments"},"review_comments":{"href":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/pulls/554/comments"},"review_comment":{"href":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/pulls/554/commits"},"statuses":{"href":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/statuses/569e10c722354758929d8c1dc266d2241d5dbbb6"}}}}