rem: if (version != PROTO_VERSION) { fprintf(stderr, "server version: %i, we need: %i\n",
add: server_version = version; DEBUG("Server version: %i\n", server_version); if (version > PROTO_VERSION) fprintf(stderr, "Warning: server uses version: %i, we support: %i\n",
context: static int sftp_init(){    int res = -1;    uint8_t type;    uint32_t version;    struct buffer buf;    buf_init(&buf, 4);    buf_add_uint32(&buf, PROTO_VERSION);    if (sftp_send(SSH_FXP_INIT, &buf) == -1)        goto out;    buf_clear(&buf);    if (sftp_read(&type, &buf) == -1)        goto out;    if (type != SSH_FXP_VERSION) {        fprintf(stderr, "protocol error\n");        goto out;    }    if (buf_get_uint32(&buf, &version) == -1)        goto out;    if (version != PROTO_VERSION) {        fprintf(stderr, "server version: %i, we need: %i\n",                version, PROTO_VERSION);        goto out;    }    res = 0; out:    buf_free(&buf);    return res;}