{"action":"created","issue":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/9857","repository_url":"https://api.github.com/repos/RIOT-OS/RIOT","labels_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/9857/labels{/name}","comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/9857/comments","events_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/9857/events","html_url":"https://github.com/RIOT-OS/RIOT/pull/9857","id":355191367,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExNzc2ODI4","number":9857,"title":"net/gcoap: add user ptr to response handler functions","user":{"login":"haukepetersen","id":620834,"node_id":"MDQ6VXNlcjYyMDgzNA==","avatar_url":"https://avatars3.githubusercontent.com/u/620834?v=4","gravatar_id":"","url":"https://api.github.com/users/haukepetersen","html_url":"https://github.com/haukepetersen","followers_url":"https://api.github.com/users/haukepetersen/followers","following_url":"https://api.github.com/users/haukepetersen/following{/other_user}","gists_url":"https://api.github.com/users/haukepetersen/gists{/gist_id}","starred_url":"https://api.github.com/users/haukepetersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haukepetersen/subscriptions","organizations_url":"https://api.github.com/users/haukepetersen/orgs","repos_url":"https://api.github.com/users/haukepetersen/repos","events_url":"https://api.github.com/users/haukepetersen/events{/privacy}","received_events_url":"https://api.github.com/users/haukepetersen/received_events","type":"User","site_admin":false},"labels":[{"id":944674418,"node_id":"MDU6TGFiZWw5NDQ2NzQ0MTg=","url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/Area:%20CoAP","name":"Area: CoAP","color":"6600ff","default":false},{"id":86443543,"node_id":"MDU6TGFiZWw4NjQ0MzU0Mw==","url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/Area:%20network","name":"Area: network","color":"6600ff","default":false},{"id":100135107,"node_id":"MDU6TGFiZWwxMDAxMzUxMDc=","url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/Discussion:%20RFC","name":"Discussion: RFC","color":"66ccff","default":false},{"id":127102429,"node_id":"MDU6TGFiZWwxMjcxMDI0Mjk=","url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/Process:%20API%20change","name":"Process: API change","color":"ff9933","default":false}],"state":"open","locked":false,"assignee":{"login":"kb2ma","id":2944058,"node_id":"MDQ6VXNlcjI5NDQwNTg=","avatar_url":"https://avatars0.githubusercontent.com/u/2944058?v=4","gravatar_id":"","url":"https://api.github.com/users/kb2ma","html_url":"https://github.com/kb2ma","followers_url":"https://api.github.com/users/kb2ma/followers","following_url":"https://api.github.com/users/kb2ma/following{/other_user}","gists_url":"https://api.github.com/users/kb2ma/gists{/gist_id}","starred_url":"https://api.github.com/users/kb2ma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kb2ma/subscriptions","organizations_url":"https://api.github.com/users/kb2ma/orgs","repos_url":"https://api.github.com/users/kb2ma/repos","events_url":"https://api.github.com/users/kb2ma/events{/privacy}","received_events_url":"https://api.github.com/users/kb2ma/received_events","type":"User","site_admin":false},"assignees":[{"login":"kb2ma","id":2944058,"node_id":"MDQ6VXNlcjI5NDQwNTg=","avatar_url":"https://avatars0.githubusercontent.com/u/2944058?v=4","gravatar_id":"","url":"https://api.github.com/users/kb2ma","html_url":"https://github.com/kb2ma","followers_url":"https://api.github.com/users/kb2ma/followers","following_url":"https://api.github.com/users/kb2ma/following{/other_user}","gists_url":"https://api.github.com/users/kb2ma/gists{/gist_id}","starred_url":"https://api.github.com/users/kb2ma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kb2ma/subscriptions","organizations_url":"https://api.github.com/users/kb2ma/orgs","repos_url":"https://api.github.com/users/kb2ma/repos","events_url":"https://api.github.com/users/kb2ma/events{/privacy}","received_events_url":"https://api.github.com/users/kb2ma/received_events","type":"User","site_admin":false},{"login":"kaspar030","id":4679640,"node_id":"MDQ6VXNlcjQ2Nzk2NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/4679640?v=4","gravatar_id":"","url":"https://api.github.com/users/kaspar030","html_url":"https://github.com/kaspar030","followers_url":"https://api.github.com/users/kaspar030/followers","following_url":"https://api.github.com/users/kaspar030/following{/other_user}","gists_url":"https://api.github.com/users/kaspar030/gists{/gist_id}","starred_url":"https://api.github.com/users/kaspar030/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaspar030/subscriptions","organizations_url":"https://api.github.com/users/kaspar030/orgs","repos_url":"https://api.github.com/users/kaspar030/repos","events_url":"https://api.github.com/users/kaspar030/events{/privacy}","received_events_url":"https://api.github.com/users/kaspar030/received_events","type":"User","site_admin":false}],"milestone":null,"comments":17,"created_at":"2018-08-29T14:35:28Z","updated_at":"2018-11-26T13:59:19Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/9857","html_url":"https://github.com/RIOT-OS/RIOT/pull/9857","diff_url":"https://github.com/RIOT-OS/RIOT/pull/9857.diff","patch_url":"https://github.com/RIOT-OS/RIOT/pull/9857.patch"},"body":"### Contribution description\r\nThis PR changes the `gcoap` API slightly to allow passing user defined pointers to response handler functions (`gcoap_resp_handler_t`). This is analog to the user context pointers that were added to the resource handler functions in nanocoap a while ago (`coap_resource_t`).\r\n\r\nAdding these user context pointers is quite useful, when handling concurrent requests of a similar type (i.e. registration to multiple CoRE RD's at the same time in my case).\r\n\r\nI actually can't remember if this change has been discussed before, or if this change does even already exist. A quick search through the open PRs and issue did not yield any results, so I guess not?!\r\n\r\n### Testing procedure\r\nSo far, this is rather a request for comments, so all changes to the code are untested...\r\n\r\n### Issues/PRs references\r\nnone\r\n"},"comment":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/comments/441647900","html_url":"https://github.com/RIOT-OS/RIOT/pull/9857#issuecomment-441647900","issue_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/9857","id":441647900,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MTY0NzkwMA==","user":{"login":"kb2ma","id":2944058,"node_id":"MDQ6VXNlcjI5NDQwNTg=","avatar_url":"https://avatars0.githubusercontent.com/u/2944058?v=4","gravatar_id":"","url":"https://api.github.com/users/kb2ma","html_url":"https://github.com/kb2ma","followers_url":"https://api.github.com/users/kb2ma/followers","following_url":"https://api.github.com/users/kb2ma/following{/other_user}","gists_url":"https://api.github.com/users/kb2ma/gists{/gist_id}","starred_url":"https://api.github.com/users/kb2ma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kb2ma/subscriptions","organizations_url":"https://api.github.com/users/kb2ma/orgs","repos_url":"https://api.github.com/users/kb2ma/repos","events_url":"https://api.github.com/users/kb2ma/events{/privacy}","received_events_url":"https://api.github.com/users/kb2ma/received_events","type":"User","site_admin":false},"created_at":"2018-11-26T13:59:19Z","updated_at":"2018-11-26T13:59:19Z","author_association":"MEMBER","body":"Now that the response handler has access to the coap_request_memo_t, we may want to streamline the implementation of cord_ep in a follow on PR. Presently cord_ep has separate handlers for on_update and on_remove. However, the coap_request_memo_t has access to the request header. So, a single handler could read the request code from the header instead of hard coding the code in the separate functions."}}
{"actor":{"display_login":"kb2ma"}}