浏览代码

Merge pull request #38 from nickhilliard/master

-nohash printed both the commented and uncommented hashes
Richard Laager 9 年之前
父节点
当前提交
1bd1be704d
共有 1 个文件被更改,包括 5 次插入0 次删除
  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 );
       printf(" */");
       printf("\n");
+      goto bailout;
     }
     memcpy (pk, "\x30\x24\x06\x0c\x2b\x06\x01\x04\x01\xba\x08\x01\x01\x02\x09", 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 );
       printf(" */");
       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 );
     printf("\n");
   }
+
+  bailout:
+
   free(pi);
   free(pj);
   free(pk);