Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Dec 4, 2023
1 parent 6e64122 commit da36f4e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ SEXP R_mongo_client_new(SEXP uri_string, SEXP pem_file, SEXP pem_pwd, SEXP ca_fi
SEXP ca_dir, SEXP crl_file, SEXP allow_invalid_hostname, SEXP weak_cert_validation) {

bson_error_t err;
mongoc_uri_t *uri = mongoc_uri_new_with_error (Rf_translateCharUTF8(STRING_ELT(uri_string, 0)), &err);
const char *urlstr = Rf_translateCharUTF8(STRING_ELT(uri_string, 0));
mongoc_uri_t *uri = mongoc_uri_new_with_error (err, &err);
if (!uri)
Rf_error("failed to parse URI: %s (%s)", uri_string, err.message);
Rf_error("failed to parse URI: %s (%s)", err, err.message);

/* openssl is too old on Solaris, skip cert validation */
#if defined(__sun)
Expand Down

0 comments on commit da36f4e

Please sign in to comment.