Skip to content
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

callRemote will always return a nil errno even if successful #294

Closed
patrikjuvonen opened this issue Aug 3, 2018 · 2 comments
Closed

callRemote will always return a nil errno even if successful #294

patrikjuvonen opened this issue Aug 3, 2018 · 2 comments
Assignees
Labels
Milestone

Comments

@patrikjuvonen
Copy link
Contributor

@patrikjuvonen patrikjuvonen commented Aug 3, 2018

Describe the bug
callRemote returns a nil errno although the request was successful. This behavior is not consistent with fetchRemote.

To Reproduce

  1. Send a request with callRemote.
  2. Inspect the errno argument provided by the callback function.

Expected behavior
CURLE_OK (0) as the errno if the request went through okay (see error codes on Wiki). If the request did not go through alright then it should return the corresponding error code for that error.

MTA Client & Server:

  • Multi Theft Auto v1.5.5-release-13959
  • Windows 10.0.17134.165

Additional context
Initially committed here: #271 (comment)
Will create a new PR for this.

@patrikjuvonen patrikjuvonen added this to the 1.5.6 milestone Aug 3, 2018
@patrikjuvonen patrikjuvonen self-assigned this Aug 3, 2018
@patrikjuvonen patrikjuvonen added this to To do in release/v1.5.6 via automation Aug 3, 2018
@Jusonex
Copy link
Contributor

@Jusonex Jusonex commented Aug 3, 2018

Can this be fixed without breaking backwards compatibility?

Loading

@patrikjuvonen
Copy link
Contributor Author

@patrikjuvonen patrikjuvonen commented Aug 3, 2018

If you prefer, we can use some sort of a version check, if that is okay to do?

Loading

ghost pushed a commit that referenced this issue Aug 4, 2018
* curl: update from 7.59.0 to 7.61.0

* curl: update premake5

* curl: fix gcc compile errors

* curl: fix gcc compile errors, part 2

* curl: fix gcc compile errors, part 3

* CRemoteCalls: set application/json Content-Type

* CRemoteCalls: return errno as 0 instead of nil if JSON was valid

* CRemoteCalls: addendum to previous commit, let's return 0 always

The reason is that the request went through and everything, it should be considered as OK instead of nil upon
success. Yes, the JSON might be invalid, but then responseData is nil, and that's ok.

* curl: revert configure and Makefile changes

* curl: revert autocrlf changes to ease diff

My Windows PC Git did autocrlf which caused changes to almost all the files, lol

* CRemoteCalls: revert change to callRemote errno behavior, see #294
@patrikjuvonen patrikjuvonen moved this from To do to In progress in release/v1.5.6 Aug 5, 2018
@qaisjp qaisjp removed this from In progress in release/v1.5.6 Aug 29, 2018
@qaisjp qaisjp removed this from the 1.5.6 milestone Aug 29, 2018
@patrikjuvonen patrikjuvonen added this to the 1.5.7 milestone Sep 4, 2018
@patrikjuvonen patrikjuvonen removed this from the 1.5.7 milestone Nov 3, 2018
@patrikjuvonen patrikjuvonen added this to the Backlog milestone Nov 3, 2018
qaisjp added a commit that referenced this issue Aug 17, 2019
The backspaces is suppresses the following text from the deprecation
message: "no longer works"

This results in a message like "callRemote callbacks will [..]"
qaisjp added a commit that referenced this issue Aug 28, 2019
Either needs removing or rewording

1. not clear enough
2. backspace characters only work in terminal, not for logs, obviously

This reverts commit a8c41df.
@qaisjp qaisjp closed this in #295 Sep 2, 2019
@patrikjuvonen patrikjuvonen removed this from the Backlog milestone Sep 2, 2019
@patrikjuvonen patrikjuvonen added this to the 1.6 milestone Sep 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants