diff --git a/Makefile b/Makefile index 3baed6a15ce9fb..aeba1939ed93e0 100644 --- a/Makefile +++ b/Makefile @@ -219,7 +219,7 @@ BINARYNAME=$(TARNAME)-$(PLATFORM)-$(ARCH) BINARYTAR=$(BINARYNAME).tar XZ=$(shell which xz > /dev/null 2>&1; echo $$?) PKG=out/$(TARNAME).pkg -packagemaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker +PACKAGEMAKER ?= /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker PKGSRC=iojs-$(DESTCPU)-$(RAWVER).tgz ifdef NIGHTLY @@ -270,7 +270,7 @@ $(PKG): release-only mv $(PKGDIR)/usr/local/bin/iojs-universal $(PKGDIR)/usr/local/bin/iojs rm -rf $(PKGDIR)/32 cat tools/osx-pkg.pmdoc/index.xml.tmpl | sed -e 's|__iojsversion__|'$(FULLVERSION)'|g' | sed -e 's|__npmversion__|'$(NPMVERSION)'|g' > tools/osx-pkg.pmdoc/index.xml - $(packagemaker) \ + $(PACKAGEMAKER) \ --id "org.nodejs.Node" \ --doc tools/osx-pkg.pmdoc \ --out $(PKG) @@ -385,7 +385,6 @@ jslint: PYTHONPATH=tools/closure_linter/:tools/gflags/ $(PYTHON) tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc -r lib/ -r src/ --exclude_files lib/punycode.js CPPLINT_EXCLUDE ?= -CPPLINT_EXCLUDE += src/node_dtrace.cc CPPLINT_EXCLUDE += src/node_lttng.cc CPPLINT_EXCLUDE += src/node_root_certs.h CPPLINT_EXCLUDE += src/node_lttng_tp.h diff --git a/doc/api/path.markdown b/doc/api/path.markdown index 6b10d1c1bb7478..08495a79e5399c 100644 --- a/doc/api/path.markdown +++ b/doc/api/path.markdown @@ -200,7 +200,7 @@ An example on Windows: process.env.PATH.split(path.delimiter) // returns - ['C:\Windows\system32', 'C:\Windows', 'C:\Program Files\iojs\'] + ['C:\\Windows\\system32', 'C:\\Windows', 'C:\\Program Files\\iojs\\'] ## path.parse(pathString) @@ -223,8 +223,8 @@ An example on Windows: path.parse('C:\\path\\dir\\index.html') // returns { - root : "C:\", - dir : "C:\path\dir", + root : "C:\\", + dir : "C:\\path\\dir", base : "index.html", ext : ".html", name : "index" diff --git a/lib/net.js b/lib/net.js index aafb707ca45654..9aca39200033b8 100644 --- a/lib/net.js +++ b/lib/net.js @@ -556,10 +556,10 @@ function onread(nread, buffer) { Socket.prototype._getpeername = function() { - if (!this._handle || !this._handle.getpeername) { - return {}; - } if (!this._peername) { + if (!this._handle || !this._handle.getpeername) { + return {}; + } var out = {}; var err = this._handle.getpeername(out); if (err) return {}; // FIXME(bnoordhuis) Throw? @@ -865,6 +865,7 @@ Socket.prototype.connect = function(options, cb) { this._writableState.errorEmitted = false; this.destroyed = false; this._handle = null; + this._peername = null; } var self = this; diff --git a/src/node_dtrace.cc b/src/node_dtrace.cc index 1b25db44e2b298..d82e0f7dcba588 100644 --- a/src/node_dtrace.cc +++ b/src/node_dtrace.cc @@ -1,12 +1,8 @@ -#include "util.h" +#include "node_dtrace.h" #ifdef HAVE_DTRACE -#include "node_dtrace.h" #include "node_provider.h" -#include #elif HAVE_ETW -#include "node_dtrace.h" -#include #include "node_win32_etw_provider.h" #include "node_win32_etw_provider-inl.h" #else @@ -29,6 +25,10 @@ #include "env.h" #include "env-inl.h" +#include "util.h" + +#include + namespace node { using v8::FunctionCallbackInfo; diff --git a/test/parallel/test-net-remote-address-port.js b/test/parallel/test-net-remote-address-port.js index 7be95ed15cc501..62b28f9cb465c9 100644 --- a/test/parallel/test-net-remote-address-port.js +++ b/test/parallel/test-net-remote-address-port.js @@ -20,6 +20,10 @@ var server = net.createServer(function(socket) { socket.on('end', function() { if (++conns_closed == 2) server.close(); }); + socket.on('close', function() { + assert.notEqual(-1, remoteAddrCandidates.indexOf(socket.remoteAddress)); + assert.notEqual(-1, remoteFamilyCandidates.indexOf(socket.remoteFamily)); + }); socket.resume(); }); @@ -32,12 +36,20 @@ server.listen(common.PORT, 'localhost', function() { assert.equal(common.PORT, client.remotePort); client.end(); }); + client.on('close', function() { + assert.notEqual(-1, remoteAddrCandidates.indexOf(client.remoteAddress)); + assert.notEqual(-1, remoteFamilyCandidates.indexOf(client.remoteFamily)); + }); client2.on('connect', function() { assert.notEqual(-1, remoteAddrCandidates.indexOf(client2.remoteAddress)); assert.notEqual(-1, remoteFamilyCandidates.indexOf(client2.remoteFamily)); assert.equal(common.PORT, client2.remotePort); client2.end(); }); + client2.on('close', function() { + assert.notEqual(-1, remoteAddrCandidates.indexOf(client2.remoteAddress)); + assert.notEqual(-1, remoteFamilyCandidates.indexOf(client2.remoteFamily)); + }); }); process.on('exit', function() {