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 · Fixed by #295

Comments

@patrikjuvonen
Copy link
Member

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 the bug label Aug 3, 2018

@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

This comment has been minimized.

Copy link
Member

commented Aug 3, 2018

Can this be fixed without breaking backwards compatibility?

@patrikjuvonen

This comment has been minimized.

Copy link
Member Author

commented Aug 3, 2018

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

patrikjuvonen added a commit to patrikjuvonen/mtasa-blue that referenced this issue Aug 3, 2018
saml1er added a commit that referenced this issue Aug 4, 2018
#270: update curl from 7.59.0 to 7.61.0 (#271)
* 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 the in progress label Aug 23, 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 modified the milestones: 1.5.7, Backlog Nov 3, 2018

@qaisjp qaisjp removed the pr submitted label Jan 4, 2019

qaisjp added a commit to qaisjp/mtasa-blue that referenced this issue Aug 17, 2019
qaisjp added a commit to qaisjp/mtasa-blue that referenced this issue Aug 17, 2019
qaisjp added a commit that referenced this issue Aug 17, 2019
Add callRemote warning for #294, #295 and #1044
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
Revert "Add callRemote warning for #294, #295 and #1044"
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 modified the milestones: Backlog, 1.6 Sep 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.