Closed revmischa closed 8 years ago
Hi revmischa, Could you give me some more information about how this issue happened? Can I simply build and run your code and it will crash? I tried that and I did not get any errors so I might be missing a step somewhere. Also, I would recommend you do not upload your root CA certificate and config file with endpoint to a public github repo. The endpoint is specific to your account and should not be shared. Anyone who wants to use your code should provide his/her endpoint and certificates.
Rahul
The root CA is the same for everyone isn't it?
Fixed my crash today: https://github.com/revmischa/cloudcam/commit/d3300c539ff4d3b795a6f1c7cce0dd39c0746be9
It is a little unexpected that you need to keep the struct passed to aws_iot_shadow_register_delta
around. If you let it deallocate then it crashes on the callback. This should probably at least be mentioned in the documentation.
It doesn't need to be. We support creating your own certificates as well for example. That sounds like a good recommendation to add to the documentation. As a general rule, the Embedded C SDK doesn't do any dynamic memory allocation. So any data that is passed in will need to be retained on the application side as well as long as it is expected to be used. I will look into making this clearer in the documentation for the next release. But am glad to hear that you found the issue :) Please let us know if you have any other questions. Thank you for using AWS IoT.
Rahul
Using v1.1.2. Code is at https://github.com/revmischa/cloudcam/tree/master/src