1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-20 02:42:09 +03:00

Protect callback function calls from macro substitution

Some structure fields holding callback addresses have the same name as the
underlying system function (connect, send, recv). Set parentheses around
their reference to suppress a possible macro substitution.

Use a macro for connect() on OS/400 to resolve a const/nonconst parameter
problem.
This commit is contained in:
Patrick Monnerat
2015-11-18 19:00:38 +01:00
committed by Daniel Stenberg
parent 8ba6bf2aef
commit 7dcf5ed6fb
2 changed files with 8 additions and 3 deletions

View File

@@ -688,7 +688,7 @@ libssh2_agent_connect(LIBSSH2_AGENT *agent)
int i, rc = -1;
for (i = 0; supported_backends[i].name; i++) {
agent->ops = supported_backends[i].ops;
rc = agent->ops->connect(agent);
rc = (agent->ops->connect)(agent);
if (!rc)
return 0;
}