Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
phillipivan committed Dec 9, 2023
1 parent a4cd3ef commit 27a2260
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/processcmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
reply = reply.slice(1)
}
reply = reply.split(addrSep)
let address = reply[1] === undefined ? 'NONE' : reply[1].toString()
let address = reply[1] === undefined ? addrCmd.none : reply[1].toString()
reply = reply[0]
let ctrl = reply[1].toString()
let tag = reply[2] === undefined ? '' : reply[2].toString()
Expand All @@ -19,7 +19,7 @@ module.exports = {
let alarmIndex = dst
let alarmState = src
let alarmText = params[2] === undefined ? '' : params[2].toString()
this.log('debug', `control ${ctrl} tag ${tag} param 1 ${params[0]} param 2 ${params[1]} address ${address}`)
//this.log('debug', `control ${ctrl} tag ${tag} param 1 ${params[0]} param 2 ${params[1]} address ${address}`)
switch (ctrl) {
case control.ackSet:
switch (tag) {
Expand Down
4 changes: 2 additions & 2 deletions src/tcp.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ module.exports = {
this.socket.destroy()
delete this.socket
}
if (this.config.hostPri) {
if (this.config.hostPri && this.config.portPri) {
this.log('debug', 'Creating New Socket')
if (this.useSecondary && this.config.hostSec) {
if (this.useSecondary && this.config.hostSec && this.config.portSec) {
this.updateStatus('Connecting to Secondary')
this.socket = new TCPHelper(this.config.hostSec, this.config.portSec)
} else {
Expand Down

0 comments on commit 27a2260

Please sign in to comment.