{"action":"created","issue":{"url":"https://api.github.com/repos/NordicSemiconductor/nRF51-ble-bcast-mesh/issues/8","labels_url":"https://api.github.com/repos/NordicSemiconductor/nRF51-ble-bcast-mesh/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/NordicSemiconductor/nRF51-ble-bcast-mesh/issues/8/comments","events_url":"https://api.github.com/repos/NordicSemiconductor/nRF51-ble-bcast-mesh/issues/8/events","html_url":"https://github.com/NordicSemiconductor/nRF51-ble-bcast-mesh/issues/8","id":62641543,"number":8,"title":"version overflow","user":{"login":"victorpasse","id":7287350,"avatar_url":"https://avatars.githubusercontent.com/u/7287350?v=3","gravatar_id":"","url":"https://api.github.com/users/victorpasse","html_url":"https://github.com/victorpasse","followers_url":"https://api.github.com/users/victorpasse/followers","following_url":"https://api.github.com/users/victorpasse/following{/other_user}","gists_url":"https://api.github.com/users/victorpasse/gists{/gist_id}","starred_url":"https://api.github.com/users/victorpasse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/victorpasse/subscriptions","organizations_url":"https://api.github.com/users/victorpasse/orgs","repos_url":"https://api.github.com/users/victorpasse/repos","events_url":"https://api.github.com/users/victorpasse/events{/privacy}","received_events_url":"https://api.github.com/users/victorpasse/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-18T09:46:55Z","updated_at":"2015-03-26T13:04:13Z","closed_at":"2015-03-26T13:04:13Z","body":"This could be a solution to the problem with version number ofverflow\r\n\r\nin mesh_srv.c\r\nold code:\r\n\r\n    /* new version */\r\n    /**@TODO: Handle version overflow */\r\n    if (version > ch_md->version_number || uninitialized)\r\n\r\nNew code:\r\n\r\n\t/* new version */\r\n\tuint16_t seperation;\r\n\tif(version >= ch_md->version_number)\r\n\t\tseperation=version-ch_md->version_number;\r\n\telse\r\n\t\tseperation=(UINT16_MAX-ch_md->version_number)+version+1;\r\n\tif ((seperation<(UINT16_MAX>>1) && seperation>0) || uninitialized)\r\n\r\nIf the received version is <(UINT16_MAX>>1) more than current version then the received version is considered a new version else a previous version"},"comment":{"url":"https://api.github.com/repos/NordicSemiconductor/nRF51-ble-bcast-mesh/issues/comments/86505039","html_url":"https://github.com/NordicSemiconductor/nRF51-ble-bcast-mesh/issues/8#issuecomment-86505039","issue_url":"https://api.github.com/repos/NordicSemiconductor/nRF51-ble-bcast-mesh/issues/8","id":86505039,"user":{"login":"trond-snekvik","id":7857838,"avatar_url":"https://avatars.githubusercontent.com/u/7857838?v=3","gravatar_id":"","url":"https://api.github.com/users/trond-snekvik","html_url":"https://github.com/trond-snekvik","followers_url":"https://api.github.com/users/trond-snekvik/followers","following_url":"https://api.github.com/users/trond-snekvik/following{/other_user}","gists_url":"https://api.github.com/users/trond-snekvik/gists{/gist_id}","starred_url":"https://api.github.com/users/trond-snekvik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trond-snekvik/subscriptions","organizations_url":"https://api.github.com/users/trond-snekvik/orgs","repos_url":"https://api.github.com/users/trond-snekvik/repos","events_url":"https://api.github.com/users/trond-snekvik/events{/privacy}","received_events_url":"https://api.github.com/users/trond-snekvik/received_events","type":"User","site_admin":false},"created_at":"2015-03-26T13:04:13Z","updated_at":"2015-03-26T13:04:13Z","body":"The solution I proposed is now part of the master branch (as of release v0.6.2), and version should now cycle like I described above. Thank you @victorpasse for reporting :)"}}