{"action":"created","comment":{"url":"https://api.github.com/repos/rilmodem/ofono/pulls/comments/31632492","id":31632492,"diff_hunk":"@@ -0,0 +1,287 @@\n+/*\n+ *\n+ *  oFono - Open Source Telephony\n+ *\n+ *  Copyright (C) 2014  Canonical Ltd.\n+ *  Copyright (C) 2015 Ratchanan Srirattanamet\n+ *\n+ *  This program is free software; you can redistribute it and/or modify\n+ *  it under the terms of the GNU General Public License version 2 as\n+ *  published by the Free Software Foundation.\n+ *\n+ *  This program is distributed in the hope that it will be useful,\n+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ *  GNU General Public License for more details.\n+ *\n+ *  You should have received a copy of the GNU General Public License\n+ *  along with this program; if not, write to the Free Software\n+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n+ *\n+ */\n+\n+#ifdef HAVE_CONFIG_H\n+#include <config.h>\n+#endif\n+\n+#define _GNU_SOURCE\n+#include <stdio.h>\n+#include <stdlib.h>\n+#include <string.h>\n+#include <errno.h>\n+\n+#include <glib.h>\n+\n+#include <ofono/log.h>\n+#include <ofono/modem.h>\n+#include <ofono/radio-settings.h>\n+\n+#include \"gril.h\"\n+#include \"grilrequest.h\"\n+#include \"grilreply.h\"\n+\n+#include \"drivers/rilmodem/radio-settings.h\"\n+#include \"drivers/rilmodem/rilutil.h\"\n+#include \"qcom_msim_modem.h\"\n+#include \"qcom_msim_util.h\"\n+\n+static struct ofono_radio_settings *multisim_rs[MULTISIM_RS_LAST] = {};","path":"drivers/qcommsimmodem/radio-settings.c","position":48,"original_position":48,"commit_id":"ef4cb5b676dec9d9b6ffe1ae04aebc307df8d661","original_commit_id":"ef4cb5b676dec9d9b6ffe1ae04aebc307df8d661","user":{"login":"alfonsosanchezbeato","id":3833021,"avatar_url":"https://avatars.githubusercontent.com/u/3833021?v=3","gravatar_id":"","url":"https://api.github.com/users/alfonsosanchezbeato","html_url":"https://github.com/alfonsosanchezbeato","followers_url":"https://api.github.com/users/alfonsosanchezbeato/followers","following_url":"https://api.github.com/users/alfonsosanchezbeato/following{/other_user}","gists_url":"https://api.github.com/users/alfonsosanchezbeato/gists{/gist_id}","starred_url":"https://api.github.com/users/alfonsosanchezbeato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfonsosanchezbeato/subscriptions","organizations_url":"https://api.github.com/users/alfonsosanchezbeato/orgs","repos_url":"https://api.github.com/users/alfonsosanchezbeato/repos","events_url":"https://api.github.com/users/alfonsosanchezbeato/events{/privacy}","received_events_url":"https://api.github.com/users/alfonsosanchezbeato/received_events","type":"User","site_admin":false},"body":"Remove the initialization or use { NULL } instead (you need to set the default value for the first array element, letting empty braces do the same is a gcc extension iirc)","created_at":"2015-06-03T15:04:43Z","updated_at":"2015-06-03T15:04:43Z","html_url":"https://github.com/rilmodem/ofono/pull/188#discussion_r31632492","pull_request_url":"https://api.github.com/repos/rilmodem/ofono/pulls/188","_links":{"self":{"href":"https://api.github.com/repos/rilmodem/ofono/pulls/comments/31632492"},"html":{"href":"https://github.com/rilmodem/ofono/pull/188#discussion_r31632492"},"pull_request":{"href":"https://api.github.com/repos/rilmodem/ofono/pulls/188"}}},"pull_request":{"url":"https://api.github.com/repos/rilmodem/ofono/pulls/188","id":36620684,"html_url":"https://github.com/rilmodem/ofono/pull/188","diff_url":"https://github.com/rilmodem/ofono/pull/188.diff","patch_url":"https://github.com/rilmodem/ofono/pull/188.patch","issue_url":"https://api.github.com/repos/rilmodem/ofono/issues/188","number":188,"state":"open","locked":false,"title":"Make qcom-msim plugin able to use other SIM slot than first SIM slot.","user":{"login":"peat-psuwit","id":6771175,"avatar_url":"https://avatars.githubusercontent.com/u/6771175?v=3","gravatar_id":"","url":"https://api.github.com/users/peat-psuwit","html_url":"https://github.com/peat-psuwit","followers_url":"https://api.github.com/users/peat-psuwit/followers","following_url":"https://api.github.com/users/peat-psuwit/following{/other_user}","gists_url":"https://api.github.com/users/peat-psuwit/gists{/gist_id}","starred_url":"https://api.github.com/users/peat-psuwit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peat-psuwit/subscriptions","organizations_url":"https://api.github.com/users/peat-psuwit/orgs","repos_url":"https://api.github.com/users/peat-psuwit/repos","events_url":"https://api.github.com/users/peat-psuwit/events{/privacy}","received_events_url":"https://api.github.com/users/peat-psuwit/received_events","type":"User","site_admin":false},"body":"This is improvement of qcom-msim plugin that allow you to use other SIM slot and be able to select which SIM will prefer 3G. This modem has limitation that only 1 SIM can prefer 3G at a time, so the new radio-settings driver will make sure that other SIMs prefer 2G before setting a SIM to prefer 3G. I code this to support more than 2 SIM slots, but there are some constants which assume that only 2 SIM slots are available. If, in the future, there are phones with more than 2 SIM slots, these constants can be edited to support them.","created_at":"2015-06-01T11:41:54Z","updated_at":"2015-06-03T15:04:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8f81b2cc5f572f147906bb47d76a23ae7c7b83fa","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rilmodem/ofono/pulls/188/commits","review_comments_url":"https://api.github.com/repos/rilmodem/ofono/pulls/188/comments","review_comment_url":"https://api.github.com/repos/rilmodem/ofono/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rilmodem/ofono/issues/188/comments","statuses_url":"https://api.github.com/repos/rilmodem/ofono/statuses/ef4cb5b676dec9d9b6ffe1ae04aebc307df8d661","head":{"label":"peat-psuwit:lg-d410-msim-merge","ref":"lg-d410-msim-merge","sha":"ef4cb5b676dec9d9b6ffe1ae04aebc307df8d661","user":{"login":"peat-psuwit","id":6771175,"avatar_url":"https://avatars.githubusercontent.com/u/6771175?v=3","gravatar_id":"","url":"https://api.github.com/users/peat-psuwit","html_url":"https://github.com/peat-psuwit","followers_url":"https://api.github.com/users/peat-psuwit/followers","following_url":"https://api.github.com/users/peat-psuwit/following{/other_user}","gists_url":"https://api.github.com/users/peat-psuwit/gists{/gist_id}","starred_url":"https://api.github.com/users/peat-psuwit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peat-psuwit/subscriptions","organizations_url":"https://api.github.com/users/peat-psuwit/orgs","repos_url":"https://api.github.com/users/peat-psuwit/repos","events_url":"https://api.github.com/users/peat-psuwit/events{/privacy}","received_events_url":"https://api.github.com/users/peat-psuwit/received_events","type":"User","site_admin":false},"repo":{"id":33370208,"name":"ofono","full_name":"peat-psuwit/ofono","owner":{"login":"peat-psuwit","id":6771175,"avatar_url":"https://avatars.githubusercontent.com/u/6771175?v=3","gravatar_id":"","url":"https://api.github.com/users/peat-psuwit","html_url":"https://github.com/peat-psuwit","followers_url":"https://api.github.com/users/peat-psuwit/followers","following_url":"https://api.github.com/users/peat-psuwit/following{/other_user}","gists_url":"https://api.github.com/users/peat-psuwit/gists{/gist_id}","starred_url":"https://api.github.com/users/peat-psuwit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peat-psuwit/subscriptions","organizations_url":"https://api.github.com/users/peat-psuwit/orgs","repos_url":"https://api.github.com/users/peat-psuwit/repos","events_url":"https://api.github.com/users/peat-psuwit/events{/privacy}","received_events_url":"https://api.github.com/users/peat-psuwit/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/peat-psuwit/ofono","description":"7f3955122af8b0349fb7d3f2db8abd754459d146","fork":true,"url":"https://api.github.com/repos/peat-psuwit/ofono","forks_url":"https://api.github.com/repos/peat-psuwit/ofono/forks","keys_url":"https://api.github.com/repos/peat-psuwit/ofono/keys{/key_id}","collaborators_url":"https://api.github.com/repos/peat-psuwit/ofono/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/peat-psuwit/ofono/teams","hooks_url":"https://api.github.com/repos/peat-psuwit/ofono/hooks","issue_events_url":"https://api.github.com/repos/peat-psuwit/ofono/issues/events{/number}","events_url":"https://api.github.com/repos/peat-psuwit/ofono/events","assignees_url":"https://api.github.com/repos/peat-psuwit/ofono/assignees{/user}","branches_url":"https://api.github.com/repos/peat-psuwit/ofono/branches{/branch}","tags_url":"https://api.github.com/repos/peat-psuwit/ofono/tags","blobs_url":"https://api.github.com/repos/peat-psuwit/ofono/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/peat-psuwit/ofono/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/peat-psuwit/ofono/git/refs{/sha}","trees_url":"https://api.github.com/repos/peat-psuwit/ofono/git/trees{/sha}","statuses_url":"https://api.github.com/repos/peat-psuwit/ofono/statuses/{sha}","languages_url":"https://api.github.com/repos/peat-psuwit/ofono/languages","stargazers_url":"https://api.github.com/repos/peat-psuwit/ofono/stargazers","contributors_url":"https://api.github.com/repos/peat-psuwit/ofono/contributors","subscribers_url":"https://api.github.com/repos/peat-psuwit/ofono/subscribers","subscription_url":"https://api.github.com/repos/peat-psuwit/ofono/subscription","commits_url":"https://api.github.com/repos/peat-psuwit/ofono/commits{/sha}","git_commits_url":"https://api.github.com/repos/peat-psuwit/ofono/git/commits{/sha}","comments_url":"https://api.github.com/repos/peat-psuwit/ofono/comments{/number}","issue_comment_url":"https://api.github.com/repos/peat-psuwit/ofono/issues/comments{/number}","contents_url":"https://api.github.com/repos/peat-psuwit/ofono/contents/{+path}","compare_url":"https://api.github.com/repos/peat-psuwit/ofono/compare/{base}...{head}","merges_url":"https://api.github.com/repos/peat-psuwit/ofono/merges","archive_url":"https://api.github.com/repos/peat-psuwit/ofono/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/peat-psuwit/ofono/downloads","issues_url":"https://api.github.com/repos/peat-psuwit/ofono/issues{/number}","pulls_url":"https://api.github.com/repos/peat-psuwit/ofono/pulls{/number}","milestones_url":"https://api.github.com/repos/peat-psuwit/ofono/milestones{/number}","notifications_url":"https://api.github.com/repos/peat-psuwit/ofono/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/peat-psuwit/ofono/labels{/name}","releases_url":"https://api.github.com/repos/peat-psuwit/ofono/releases{/id}","created_at":"2015-04-03T15:49:11Z","updated_at":"2015-04-23T13:08:05Z","pushed_at":"2015-06-02T15:13:17Z","git_url":"git://github.com/peat-psuwit/ofono.git","ssh_url":"git@github.com:peat-psuwit/ofono.git","clone_url":"https://github.com/peat-psuwit/ofono.git","svn_url":"https://github.com/peat-psuwit/ofono","homepage":"","size":23136,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"rilmodem:master","ref":"master","sha":"32de8889266dabb237d1f75b9b07a503d3cc7dde","user":{"login":"rilmodem","id":5394617,"avatar_url":"https://avatars.githubusercontent.com/u/5394617?v=3","gravatar_id":"","url":"https://api.github.com/users/rilmodem","html_url":"https://github.com/rilmodem","followers_url":"https://api.github.com/users/rilmodem/followers","following_url":"https://api.github.com/users/rilmodem/following{/other_user}","gists_url":"https://api.github.com/users/rilmodem/gists{/gist_id}","starred_url":"https://api.github.com/users/rilmodem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rilmodem/subscriptions","organizations_url":"https://api.github.com/users/rilmodem/orgs","repos_url":"https://api.github.com/users/rilmodem/repos","events_url":"https://api.github.com/users/rilmodem/events{/privacy}","received_events_url":"https://api.github.com/users/rilmodem/received_events","type":"Organization","site_admin":false},"repo":{"id":12710932,"name":"ofono","full_name":"rilmodem/ofono","owner":{"login":"rilmodem","id":5394617,"avatar_url":"https://avatars.githubusercontent.com/u/5394617?v=3","gravatar_id":"","url":"https://api.github.com/users/rilmodem","html_url":"https://github.com/rilmodem","followers_url":"https://api.github.com/users/rilmodem/followers","following_url":"https://api.github.com/users/rilmodem/following{/other_user}","gists_url":"https://api.github.com/users/rilmodem/gists{/gist_id}","starred_url":"https://api.github.com/users/rilmodem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rilmodem/subscriptions","organizations_url":"https://api.github.com/users/rilmodem/orgs","repos_url":"https://api.github.com/users/rilmodem/repos","events_url":"https://api.github.com/users/rilmodem/events{/privacy}","received_events_url":"https://api.github.com/users/rilmodem/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rilmodem/ofono","description":"7f3955122af8b0349fb7d3f2db8abd754459d146","fork":false,"url":"https://api.github.com/repos/rilmodem/ofono","forks_url":"https://api.github.com/repos/rilmodem/ofono/forks","keys_url":"https://api.github.com/repos/rilmodem/ofono/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rilmodem/ofono/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rilmodem/ofono/teams","hooks_url":"https://api.github.com/repos/rilmodem/ofono/hooks","issue_events_url":"https://api.github.com/repos/rilmodem/ofono/issues/events{/number}","events_url":"https://api.github.com/repos/rilmodem/ofono/events","assignees_url":"https://api.github.com/repos/rilmodem/ofono/assignees{/user}","branches_url":"https://api.github.com/repos/rilmodem/ofono/branches{/branch}","tags_url":"https://api.github.com/repos/rilmodem/ofono/tags","blobs_url":"https://api.github.com/repos/rilmodem/ofono/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rilmodem/ofono/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rilmodem/ofono/git/refs{/sha}","trees_url":"https://api.github.com/repos/rilmodem/ofono/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rilmodem/ofono/statuses/{sha}","languages_url":"https://api.github.com/repos/rilmodem/ofono/languages","stargazers_url":"https://api.github.com/repos/rilmodem/ofono/stargazers","contributors_url":"https://api.github.com/repos/rilmodem/ofono/contributors","subscribers_url":"https://api.github.com/repos/rilmodem/ofono/subscribers","subscription_url":"https://api.github.com/repos/rilmodem/ofono/subscription","commits_url":"https://api.github.com/repos/rilmodem/ofono/commits{/sha}","git_commits_url":"https://api.github.com/repos/rilmodem/ofono/git/commits{/sha}","comments_url":"https://api.github.com/repos/rilmodem/ofono/comments{/number}","issue_comment_url":"https://api.github.com/repos/rilmodem/ofono/issues/comments{/number}","contents_url":"https://api.github.com/repos/rilmodem/ofono/contents/{+path}","compare_url":"https://api.github.com/repos/rilmodem/ofono/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rilmodem/ofono/merges","archive_url":"https://api.github.com/repos/rilmodem/ofono/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rilmodem/ofono/downloads","issues_url":"https://api.github.com/repos/rilmodem/ofono/issues{/number}","pulls_url":"https://api.github.com/repos/rilmodem/ofono/pulls{/number}","milestones_url":"https://api.github.com/repos/rilmodem/ofono/milestones{/number}","notifications_url":"https://api.github.com/repos/rilmodem/ofono/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rilmodem/ofono/labels{/name}","releases_url":"https://api.github.com/repos/rilmodem/ofono/releases{/id}","created_at":"2013-09-09T19:45:47Z","updated_at":"2015-04-30T18:11:07Z","pushed_at":"2015-06-02T15:13:17Z","git_url":"git://github.com/rilmodem/ofono.git","ssh_url":"git@github.com:rilmodem/ofono.git","clone_url":"https://github.com/rilmodem/ofono.git","svn_url":"https://github.com/rilmodem/ofono","homepage":"","size":25586,"stargazers_count":3,"watchers_count":3,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":12,"forks":13,"open_issues":12,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rilmodem/ofono/pulls/188"},"html":{"href":"https://github.com/rilmodem/ofono/pull/188"},"issue":{"href":"https://api.github.com/repos/rilmodem/ofono/issues/188"},"comments":{"href":"https://api.github.com/repos/rilmodem/ofono/issues/188/comments"},"review_comments":{"href":"https://api.github.com/repos/rilmodem/ofono/pulls/188/comments"},"review_comment":{"href":"https://api.github.com/repos/rilmodem/ofono/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rilmodem/ofono/pulls/188/commits"},"statuses":{"href":"https://api.github.com/repos/rilmodem/ofono/statuses/ef4cb5b676dec9d9b6ffe1ae04aebc307df8d661"}}}}