Jelajahi Sumber

PacketPassNotifier: remove useless debug code

ambrop7 15 tahun lalu
induk
melakukan
087189af36
2 mengubah file dengan 0 tambahan dan 25 penghapusan
  1. 0 22
      flow/PacketPassNotifier.c
  2. 0 3
      flow/PacketPassNotifier.h

+ 0 - 22
flow/PacketPassNotifier.c

@@ -24,19 +24,10 @@
 
 #include <flow/PacketPassNotifier.h>
 
-static void input_handler_send (PacketPassNotifier *o, uint8_t *data, int data_len);
-static void input_handler_cancel (PacketPassNotifier *o);
-static void output_handler_done (PacketPassNotifier *o);
-
 void input_handler_send (PacketPassNotifier *o, uint8_t *data, int data_len)
 {
-    ASSERT(!o->d_in_have)
     DebugObject_Access(&o->d_obj);
     
-    #ifndef NDEBUG
-    o->d_in_have = 1;
-    #endif
-    
     // schedule send
     PacketPassInterface_Sender_Send(o->output, data, data_len);
     
@@ -49,26 +40,16 @@ void input_handler_send (PacketPassNotifier *o, uint8_t *data, int data_len)
 
 void input_handler_cancel (PacketPassNotifier *o)
 {
-    ASSERT(o->d_in_have)
     DebugObject_Access(&o->d_obj);
     
     PacketPassInterface_Sender_Cancel(o->output);
-    
-    #ifndef NDEBUG
-    o->d_in_have = 0;
-    #endif
 }
 
 void output_handler_done (PacketPassNotifier *o)
 {
-    ASSERT(o->d_in_have)
     DebugObject_Access(&o->d_obj);
     
     PacketPassInterface_Done(&o->input);
-    
-    #ifndef NDEBUG
-    o->d_in_have = 0;
-    #endif
 }
 
 void PacketPassNotifier_Init (PacketPassNotifier *o, PacketPassInterface *output, BPendingGroup *pg)
@@ -89,9 +70,6 @@ void PacketPassNotifier_Init (PacketPassNotifier *o, PacketPassInterface *output
     o->handler = NULL;
     
     DebugObject_Init(&o->d_obj);
-    #ifndef NDEBUG
-    o->d_in_have = 0;
-    #endif
 }
 
 void PacketPassNotifier_Free (PacketPassNotifier *o)

+ 0 - 3
flow/PacketPassNotifier.h

@@ -52,9 +52,6 @@ typedef struct {
     PacketPassNotifier_handler_notify handler;
     void *handler_user;
     DebugObject d_obj;
-    #ifndef NDEBUG
-    int d_in_have;
-    #endif
 } PacketPassNotifier;
 
 /**