Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions doc/api/path.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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"
Expand Down
7 changes: 4 additions & 3 deletions lib/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions src/node_dtrace.cc
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
#include "util.h"
#include "node_dtrace.h"

#ifdef HAVE_DTRACE
#include "node_dtrace.h"
#include "node_provider.h"
#include <string.h>
#elif HAVE_ETW
#include "node_dtrace.h"
#include <string.h>
#include "node_win32_etw_provider.h"
#include "node_win32_etw_provider-inl.h"
#else
Expand All @@ -29,6 +25,10 @@
#include "env.h"
#include "env-inl.h"

#include "util.h"

#include <string.h>

namespace node {

using v8::FunctionCallbackInfo;
Expand Down
12 changes: 12 additions & 0 deletions test/parallel/test-net-remote-address-port.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});

Expand All @@ -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() {
Expand Down