Skip to content

Commit

Permalink
Fixed compilation errors introduced by 629ec64..
Browse files Browse the repository at this point in the history
  • Loading branch information
9EOR9 committed Oct 18, 2016
1 parent 532ad45 commit 468cda3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions libmariadb/secure/gnutls.c
Expand Up @@ -1261,12 +1261,12 @@ my_bool ma_tls_connect(MARIADB_TLS *ctls)
return 0;
}

size_t ma_tls_read(MARIADB_TLS *ctls, const uchar* buffer, size_t length)
ssize_t ma_tls_read(MARIADB_TLS *ctls, const uchar* buffer, size_t length)
{
return gnutls_record_recv((gnutls_session_t )ctls->ssl, (void *)buffer, length);
}

size_t ma_tls_write(MARIADB_TLS *ctls, const uchar* buffer, size_t length)
ssize_t ma_tls_write(MARIADB_TLS *ctls, const uchar* buffer, size_t length)
{
return gnutls_record_send((gnutls_session_t )ctls->ssl, (void *)buffer, length);
}
Expand Down
7 changes: 4 additions & 3 deletions libmariadb/secure/openssl.c
Expand Up @@ -604,12 +604,12 @@ my_bool ma_tls_connect(MARIADB_TLS *ctls)
return 0;
}

size_t ma_tls_read(MARIADB_TLS *ctls, const uchar* buffer, size_t length)
ssize_t ma_tls_read(MARIADB_TLS *ctls, const uchar* buffer, size_t length)
{
return SSL_read((SSL *)ctls->ssl, (void *)buffer, (int)length);
}

size_t ma_tls_write(MARIADB_TLS *ctls, const uchar* buffer, size_t length)
ssize_t ma_tls_write(MARIADB_TLS *ctls, const uchar* buffer, size_t length)
{
return SSL_write((SSL *)ctls->ssl, (void *)buffer, (int)length);
}
Expand All @@ -618,11 +618,12 @@ my_bool ma_tls_close(MARIADB_TLS *ctls)
{
int i, rc;
SSL *ssl;
SSL_CTX *ctx= NULL;

if (!ctls || !ctls->ssl)
return 1;
ssl= (SSL *)ctls->ssl;
SSL_CTX *ctx= SSL_get_SSL_CTX(ssl);
ctx= SSL_get_SSL_CTX(ssl);
if (ctx)
SSL_CTX_free(ctx);

Expand Down
2 changes: 1 addition & 1 deletion unittest/libmariadb/bulk1.c
Expand Up @@ -158,7 +158,7 @@ static int bulk2(MYSQL *mysql)
rc= mysql_stmt_attr_set(stmt, STMT_ATTR_ARRAY_SIZE, &array_size);
check_stmt_rc(rc, stmt);

rc= mysql_stmt_bind_param(stmt, &bind);
rc= mysql_stmt_bind_param(stmt, bind);
check_stmt_rc(rc, stmt);

rc= mysql_stmt_execute(stmt);
Expand Down

0 comments on commit 468cda3

Please sign in to comment.