Skip to content

Commit

Permalink
Added check if NetSNMPJSON file is not there. Create and load defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
Maurice Garcia committed May 8, 2015
1 parent d245e8b commit 6fc8e63
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/com/comcast/oscar/netsnmp/NetSNMP.java
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,9 @@ private static String CheckOIDDBLookup(String sOID) {
*/
private static void FixNullNetSNMPJSON() {

if (HexString.fileToByteArray(DirectoryStructureNetSNMP.fNetSNMPJSON()).length == 0) {
if (!DirectoryStructureNetSNMP.fNetSNMPJSON().exists()) {
Disk.writeToDisk("{\"1.3.6\":\"dod\"}", DirectoryStructureNetSNMP.fNetSNMPJSON());
} else if (HexString.fileToByteArray(DirectoryStructureNetSNMP.fNetSNMPJSON()).length == 0) {
Disk.writeToDisk("{\"1.3.6\":\"dod\"}", DirectoryStructureNetSNMP.fNetSNMPJSON());
}

Expand Down

0 comments on commit 6fc8e63

Please sign in to comment.