New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add error handling code for some external APIs #17458
Conversation
@ZhouyangJia you should probably squash your last 2 commits as the reinterpret_cast really belongs in the second commit. |
@ZhouyangJia you should only have 2 commits and no merge commits. |
Please don't close and reopen a new PR, just fix the commits in this PR. If you need some guidance on how to do this happy to help. |
Check the return value of socket and add a log message when socket fails. Add error handling for fopen, or the program will crash at "while (fgets(buf, sizeof (buf), fp))" since fp is null. Change NULL to nullptr in this file for consistency.
Ok, looking good. @AlwinEsch are you happy with this now? |
I appreciate your patience and kind reply. As you can see, I'm struggling to figure out how the PR works. Not sure if I do the thing right this time. Thanks |
That's ok, feel free to ask questions if you not sure what to do ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy 😁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good.
@ZhouyangJia once Jenkins is happy we can merge this. |
Add error handling code for some external APIs
This PR is responsible for the following crash on kodi startup (50/50 chance of hitting it):
Crashlogs: Ubuntu 19.10/x86_64: http://ix.io/2iYH After reverting this PR the crashes stop. |
Add error handling code for some external APIs
Add error handling code for some external APIs
Add error handling code for some external APIs
Add error handling code for some external APIs
Add error handling code for some external APIs
Add error handling code for some external APIs
Add error handling code for some external APIs
Add error handling code for some external APIs
Add error handling code for some external APIs
Add error handling code for some external APIs
This patch adds error handling for fopen and socket,
and fixes the issues mentioned in #13607.
Description
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of change
Checklist: