From aa2e2e56e31860fe8ca5869a3cf2643f5cd37855 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Sat, 11 Aug 2018 20:45:50 -0600 Subject: [PATCH] Fix FTN address lookup crash when scanning --- core/scanner_tossers/ftn_bso.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/scanner_tossers/ftn_bso.js b/core/scanner_tossers/ftn_bso.js index f20e61ea..e2260d93 100644 --- a/core/scanner_tossers/ftn_bso.js +++ b/core/scanner_tossers/ftn_bso.js @@ -1240,7 +1240,7 @@ function FTNMessageScanTossModule() { // we can only assume the message is to the +op, else we'll have to fail. // const toUserNameAsAddress = Address.fromString(message.toUserName); - if(toUserNameAsAddress.isValid()) { + if(toUserNameAsAddress && toUserNameAsAddress.isValid()) { Log.info( { toUserName : message.toUserName, fromUserName : message.fromUserName }, @@ -1879,7 +1879,7 @@ function FTNMessageScanTossModule() { if(err) { Log.warn( { error : err.message, oldPath : oldPath }, 'Failed removing old physical file during TIC replacement'); } else { - Log.debug( { oldPath : oldPath }, 'Removed old physical file during TIC replacement'); + Log.trace( { oldPath : oldPath }, 'Removed old physical file during TIC replacement'); } return callback(null, localInfo); // continue even if err }); @@ -1889,7 +1889,7 @@ function FTNMessageScanTossModule() { if(err) { Log.error( { error : err.message, reason : err.reason, tic : ticFileInfo.filePath }, 'Failed import/update TIC record' ); } else { - Log.debug( + Log.info( { tic : ticFileInfo.path, file : ticFileInfo.filePath, area : localInfo.areaTag }, 'TIC imported successfully' );