Skip to content

Commit 14533db

Browse files
committed
Add a little tracing love
1 parent 57ed2c9 commit 14533db

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

php_phongo.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include <mongoc-cursor-cursorid-private.h>
3333
#include <mongoc-read-prefs-private.h>
3434
#include <mongoc-bulk-operation-private.h>
35+
#include <mongoc-trace.h>
3536

3637

3738
/* PHP Core stuff */
@@ -776,6 +777,7 @@ mongoc_stream_t* phongo_stream_initiator(const mongoc_uri_t *uri, const mongoc_h
776777
int dsn_len;
777778
TSRMLS_FETCH();
778779

780+
ENTRY;
779781

780782
switch (host->family) {
781783
#if defined(AF_INET6)
@@ -791,7 +793,7 @@ mongoc_stream_t* phongo_stream_initiator(const mongoc_uri_t *uri, const mongoc_h
791793

792794
default:
793795
bson_set_error (error, MONGOC_ERROR_STREAM, MONGOC_ERROR_STREAM_INVALID_TYPE, "Invalid address family: 0x%02x", host->family);
794-
return NULL;
796+
RETURN(NULL);
795797
}
796798

797799
options = mongoc_uri_get_options(uri);
@@ -830,7 +832,7 @@ mongoc_stream_t* phongo_stream_initiator(const mongoc_uri_t *uri, const mongoc_h
830832
if (errmsg) {
831833
efree(errmsg);
832834
}
833-
return NULL;
835+
RETURN(NULL);
834836
}
835837

836838
/* Avoid invalid leak warning in debug mode when freeing the stream */
@@ -890,7 +892,7 @@ mongoc_stream_t* phongo_stream_initiator(const mongoc_uri_t *uri, const mongoc_h
890892
}
891893
}
892894

893-
return (mongoc_stream_t *) base_stream;
895+
RETURN((mongoc_stream_t *)base_stream);
894896
} /* }}} */
895897

896898
/* }}} */

0 commit comments

Comments
 (0)