fix #868: don't assert but simply ignore values that don't have the proper size
authorUlf Lamping <ulf.lamping@web.de>
Mon, 10 Apr 2006 01:34:23 +0000 (01:34 -0000)
committerUlf Lamping <ulf.lamping@web.de>
Mon, 10 Apr 2006 01:34:23 +0000 (01:34 -0000)
svn path=/trunk/; revision=17845

capture_wpcap_packet.c

index 61ed96a4e86c0892940abb5cc468290018793a4a..1b132b95adeac019988df466f4c54dcd0f2ef05b 100644 (file)
@@ -270,8 +270,7 @@ wpcap_packet_request_uint(void *adapter, ULONG Oid, UINT *value)
 
 
     Status = wpcap_packet_request(adapter, Oid, FALSE /* !set */, (char *) value, &length);
-    if(Status) {
-        g_assert(length == sizeof(UINT));
+    if(Status && length == sizeof(UINT)) {
         return 1;
     } else {
         return 0;
@@ -288,8 +287,7 @@ wpcap_packet_request_ulong(void *adapter, ULONG Oid, ULONG *value)
 
 
     Status = wpcap_packet_request(adapter, Oid, FALSE /* !set */, (char *) value, &length);
-    if(Status) {
-        g_assert(length == sizeof(ULONG));
+    if(Status && length == sizeof(ULONG)) {
         return 1;
     } else {
         return 0;