Diff for /qemu/slirp/sbuf.c between versions 1.1.1.4 and 1.1.1.5

version 1.1.1.4, 2018/04/24 17:25:39 version 1.1.1.5, 2018/04/24 19:51:34
Line 6 Line 6
  */   */
   
 #include <slirp.h>  #include <slirp.h>
   #include <main-loop.h>
   
 static void sbappendsb(struct sbuf *sb, struct mbuf *m);  static void sbappendsb(struct sbuf *sb, struct mbuf *m);
   
Line 18  sbfree(struct sbuf *sb) Line 19  sbfree(struct sbuf *sb)
 void  void
 sbdrop(struct sbuf *sb, int num)  sbdrop(struct sbuf *sb, int num)
 {  {
       int limit = sb->sb_datalen / 2;
   
         /*          /*
          * We can only drop how much we have           * We can only drop how much we have
          * This should never succeed           * This should never succeed
Line 29  sbdrop(struct sbuf *sb, int num) Line 32  sbdrop(struct sbuf *sb, int num)
         if(sb->sb_rptr >= sb->sb_data + sb->sb_datalen)          if(sb->sb_rptr >= sb->sb_data + sb->sb_datalen)
                 sb->sb_rptr -= sb->sb_datalen;                  sb->sb_rptr -= sb->sb_datalen;
   
       if (sb->sb_cc < limit && sb->sb_cc + num >= limit) {
           qemu_notify_event();
       }
 }  }
   
 void  void

Removed from v.1.1.1.4  
changed lines
  Added in v.1.1.1.5


unix.superglobalmegacorp.com