Skip to content

Commit 0562092

Browse files
committed
Simplify hash and fix windows build
1 parent d1e9377 commit 0562092

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

php_phongo.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -941,16 +941,7 @@ mongoc_stream_t* phongo_stream_initiator(const mongoc_uri_t *uri, const mongoc_h
941941
timeoutp = &timeout;
942942
}
943943

944-
spprintf(&uniqid, 0, "mongodb://%s:%s@%s:%d/%s?ssl=%d&authMechanism=%s&authSource=%s",
945-
mongoc_uri_get_username(uri) ?: "",
946-
mongoc_uri_get_password(uri) ?: "",
947-
host->host,
948-
host->port,
949-
mongoc_uri_get_database(uri) ?: "",
950-
mongoc_uri_get_ssl(uri) ? 1 : 0,
951-
mongoc_uri_get_auth_mechanism(uri) ?: "",
952-
mongoc_uri_get_auth_source(uri) ?: ""
953-
);
944+
spprintf(&uniqid, 0, "%s:%d[%s]", host->host, host->port, mongoc_uri_get_string(uri));
954945

955946
mongoc_log(MONGOC_LOG_LEVEL_DEBUG, MONGOC_LOG_DOMAIN, "Connecting to '%s'", uniqid);
956947
stream = php_stream_xport_create(dsn, dsn_len, 0, STREAM_XPORT_CLIENT | STREAM_XPORT_CONNECT | STREAM_XPORT_CONNECT_ASYNC, uniqid, timeoutp, (php_stream_context *)user_data, &errmsg, &errcode);

0 commit comments

Comments
 (0)