fix udp node messages

(timing issue still outstanding)
This commit is contained in:
Dave Conway-Jones 2015-11-16 00:25:26 +00:00
parent 35e2caff13
commit 60812b2d8a
2 changed files with 4 additions and 4 deletions

View File

@ -103,7 +103,7 @@ module.exports = function(RED) {
var node = this; var node = this;
var sock = dgram.createSocket(node.ipv); // default to ipv4 var sock = dgram.createSocket(node.ipv); // default to ipv4
sock.on("error", function(err) { sock.on("error", function(err) {
// Any async error will also get reported in the sock.send call. // Any async error will also get reported in the sock.send call.
// This handler is needed to ensure the error marked as handled to // This handler is needed to ensure the error marked as handled to
@ -134,9 +134,9 @@ module.exports = function(RED) {
}); });
} else if (node.outport != "") { } else if (node.outport != "") {
sock.bind(node.outport); sock.bind(node.outport);
node.log(RED._("udp.errors.ready",{outport:node.outport,host:node.addr,port:node.port})); node.log(RED._("udp.status.ready",{outport:node.outport,host:node.addr,port:node.port}));
} else { } else {
node.log(RED._("udp.errors.ready-nolocal",{host:node.addr,port:node.port})); node.log(RED._("udp.status.ready-nolocal",{host:node.addr,port:node.port}));
} }
node.on("input", function(msg) { node.on("input", function(msg) {

View File

@ -412,7 +412,7 @@
}, },
"errors": { "errors": {
"access-error": "UDP access error, you may need root access for ports below 1024", "access-error": "UDP access error, you may need root access for ports below 1024",
"error": "error: __error_", "error": "error: __error__",
"bad-mcaddress": "Bad Multicast Address", "bad-mcaddress": "Bad Multicast Address",
"interface": "Must be ip address of the required interface", "interface": "Must be ip address of the required interface",
"ip-notset": "udp: ip address not set", "ip-notset": "udp: ip address not set",