Browse Source

Merge pull request #38 from nickhilliard/master

-nohash printed both the commented and uncommented hashes
Richard Laager 9 years ago
parent
commit
1bd1be704d
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/docsis_decode.c

+ 5 - 0
src/docsis_decode.c

@@ -313,6 +313,7 @@ void decode_snmp_object (unsigned char *tlvbuf, symbol_type *sym, size_t length
       decode_vbind (tlvbuf, length );
       decode_vbind (tlvbuf, length );
       printf(" */");
       printf(" */");
       printf("\n");
       printf("\n");
+      goto bailout;
     }
     }
     memcpy (pk, "\x30\x24\x06\x0c\x2b\x06\x01\x04\x01\xba\x08\x01\x01\x02\x09", 15);
     memcpy (pk, "\x30\x24\x06\x0c\x2b\x06\x01\x04\x01\xba\x08\x01\x01\x02\x09", 15);
     memcpy (pl, tlvbuf, 15);
     memcpy (pl, tlvbuf, 15);
@@ -322,6 +323,7 @@ void decode_snmp_object (unsigned char *tlvbuf, symbol_type *sym, size_t length
       decode_vbind (tlvbuf, length );
       decode_vbind (tlvbuf, length );
       printf(" */");
       printf(" */");
       printf("\n");
       printf("\n");
+      goto bailout;
     }
     }
   }
   }
 
 
@@ -361,6 +363,9 @@ void decode_snmp_object (unsigned char *tlvbuf, symbol_type *sym, size_t length
     decode_vbind (tlvbuf, length );
     decode_vbind (tlvbuf, length );
     printf("\n");
     printf("\n");
   }
   }
+
+  bailout:
+
   free(pi);
   free(pi);
   free(pj);
   free(pj);
   free(pk);
   free(pk);