@@ -91,7 +91,8 @@ using namespace v8;
9191 } \
9292 node_dtrace_connection_t conn; \
9393 Local<Object> _##conn = Local<Object>::Cast(arg); \
94- SLURP_INT (_##conn, fd, &conn.fd); \
94+ Local<Object> _handle = (_##conn)->Get (String::New(" _handle" ))->ToObject(); \
95+ SLURP_INT (_handle, fd, &conn.fd); \
9596 SLURP_STRING (_##conn, remoteAddress, &conn.remote); \
9697 SLURP_INT (_##conn, remotePort, &conn.port); \
9798 SLURP_INT (_##conn, bufferSize, &conn.buffered);
@@ -139,7 +140,7 @@ Handle<Value> DTRACE_NET_SERVER_CONNECTION(const Arguments& args) {
139140 NODE_NET_SERVER_CONNECTION (conn.fd , conn.remote , conn.port , \
140141 conn.buffered );
141142#else
142- NODE_NET_SERVER_CONNECTION (&conn, conn.remote , conn.port );
143+ NODE_NET_SERVER_CONNECTION (&conn, conn.remote , conn.port , conn. fd );
143144#endif
144145
145146 return Undefined ();
@@ -157,7 +158,7 @@ Handle<Value> DTRACE_NET_STREAM_END(const Arguments& args) {
157158#ifdef HAVE_SYSTEMTAP
158159 NODE_NET_STREAM_END (conn.fd , conn.remote , conn.port , conn.buffered );
159160#else
160- NODE_NET_STREAM_END (&conn, conn.remote , conn.port );
161+ NODE_NET_STREAM_END (&conn, conn.remote , conn.port , conn. fd );
161162#endif
162163
163164 return Undefined ();
@@ -181,7 +182,7 @@ Handle<Value> DTRACE_NET_SOCKET_READ(const Arguments& args) {
181182 " argument 1 to be number of bytes" ))));
182183 }
183184 int nbytes = args[1 ]->Int32Value ();
184- NODE_NET_SOCKET_READ (&conn, nbytes, conn.remote , conn.port );
185+ NODE_NET_SOCKET_READ (&conn, nbytes, conn.remote , conn.port , conn. fd );
185186#endif
186187
187188 return Undefined ();
@@ -205,7 +206,7 @@ Handle<Value> DTRACE_NET_SOCKET_WRITE(const Arguments& args) {
205206 " argument 1 to be number of bytes" ))));
206207 }
207208 int nbytes = args[1 ]->Int32Value ();
208- NODE_NET_SOCKET_WRITE (&conn, nbytes, conn.remote , conn.port );
209+ NODE_NET_SOCKET_WRITE (&conn, nbytes, conn.remote , conn.port , conn. fd );
209210#endif
210211
211212 return Undefined ();
@@ -248,7 +249,7 @@ Handle<Value> DTRACE_HTTP_SERVER_REQUEST(const Arguments& args) {
248249 conn.buffered );
249250#else
250251 NODE_HTTP_SERVER_REQUEST (&req, &conn, conn.remote , conn.port , req.method , \
251- req.url );
252+ req.url , conn. fd );
252253#endif
253254 return Undefined ();
254255}
@@ -265,7 +266,7 @@ Handle<Value> DTRACE_HTTP_SERVER_RESPONSE(const Arguments& args) {
265266#ifdef HAVE_SYSTEMTAP
266267 NODE_HTTP_SERVER_RESPONSE (conn.fd , conn.remote , conn.port , conn.buffered );
267268#else
268- NODE_HTTP_SERVER_RESPONSE (&conn, conn.remote , conn.port );
269+ NODE_HTTP_SERVER_RESPONSE (&conn, conn.remote , conn.port , conn. fd );
269270#endif
270271
271272 return Undefined ();
@@ -312,7 +313,7 @@ Handle<Value> DTRACE_HTTP_CLIENT_REQUEST(const Arguments& args) {
312313 conn.buffered );
313314#else
314315 NODE_HTTP_CLIENT_REQUEST (&req, &conn, conn.remote , conn.port , req.method , \
315- req.url );
316+ req.url , conn. fd );
316317#endif
317318 return Undefined ();
318319}
@@ -328,7 +329,7 @@ Handle<Value> DTRACE_HTTP_CLIENT_RESPONSE(const Arguments& args) {
328329#ifdef HAVE_SYSTEMTAP
329330 NODE_HTTP_CLIENT_RESPONSE (conn.fd , conn.remote , conn.port , conn.buffered );
330331#else
331- NODE_HTTP_CLIENT_RESPONSE (&conn, conn.remote , conn.port );
332+ NODE_HTTP_CLIENT_RESPONSE (&conn, conn.remote , conn.port , conn. fd );
332333#endif
333334
334335 return Undefined ();
0 commit comments