[BACK]Return to sock.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / aucat

Diff for /src/usr.bin/aucat/Attic/sock.c between version 1.33 and 1.34

version 1.33, 2009/10/22 21:41:30 version 1.34, 2009/10/27 22:41:03
Line 53 
Line 53 
 };  };
   
   
   void sock_setvol(void *, unsigned);
   
   struct ctl_ops ctl_sockops = {
           sock_setvol,
   };
   
 void  void
 rsock_done(struct aproc *p)  rsock_done(struct aproc *p)
 {  {
Line 63 
Line 69 
         sock_reset(f);          sock_reset(f);
         f->pipe.file.rproc = NULL;          f->pipe.file.rproc = NULL;
         if (f->pipe.file.wproc) {          if (f->pipe.file.wproc) {
                 if (dev_midi && f->slot >= 0)                  if (f->slot >= 0)
                         ctl_slotdel(dev_midi, f->slot);                          ctl_slotdel(dev_midi, f->slot);
                 aproc_del(f->pipe.file.wproc);                  aproc_del(f->pipe.file.wproc);
                 file_del(&f->pipe.file);                  file_del(&f->pipe.file);
Line 80 
Line 86 
         if (!sock_read(f))          if (!sock_read(f))
                 return 0;                  return 0;
         obuf = LIST_FIRST(&p->obuflist);          obuf = LIST_FIRST(&p->obuflist);
         if (obuf) {          if (obuf && f->pstate >= SOCK_RUN) {
                 if (!abuf_flush(obuf))                  if (!abuf_flush(obuf))
                         return 0;                          return 0;
         }          }
Line 160 
Line 166 
         sock_reset(f);          sock_reset(f);
         f->pipe.file.wproc = NULL;          f->pipe.file.wproc = NULL;
         if (f->pipe.file.rproc) {          if (f->pipe.file.rproc) {
                 if (dev_midi && f->slot >= 0)                  if (f->slot >= 0)
                         ctl_slotdel(dev_midi, f->slot);                          ctl_slotdel(dev_midi, f->slot);
                 aproc_del(f->pipe.file.rproc);                  aproc_del(f->pipe.file.rproc);
                 file_del(&f->pipe.file);                  file_del(&f->pipe.file);
Line 685 
Line 691 
                 f->mode |= AMSG_REC;                  f->mode |= AMSG_REC;
         }          }
         if (dev_midi) {          if (dev_midi) {
                 f->slot = ctl_slotnew(dev_midi, p->who, sock_setvol, f);                  f->slot = ctl_slotnew(dev_midi, p->who, &ctl_sockops, f);
                 if (f->slot < 0) {                  if (f->slot < 0) {
                         return 0;                          return 0;
                 }                  }
Line 713 
Line 719 
                         aproc_del(f->pipe.file.rproc);                          aproc_del(f->pipe.file.rproc);
                         return 0;                          return 0;
                 }                  }
                   if (f->pstate == SOCK_START &&
                       ABUF_FULL(LIST_FIRST(&f->pipe.file.rproc->obuflist))) {
                           aproc_del(f->pipe.file.rproc);
                           return 0;
                   }
                 f->rstate = SOCK_RDATA;                  f->rstate = SOCK_RDATA;
                 f->rtodo = m->u.data.size;                  f->rtodo = m->u.data.size;
                 if (f->rtodo == 0) {                  if (f->rtodo == 0) {
Line 805 
Line 816 
                         return 0;                          return 0;
                 }                  }
                 sock_setvol(f, m->u.vol.ctl);                  sock_setvol(f, m->u.vol.ctl);
                 if (dev_midi && f->slot >= 0)                  if (f->slot >= 0)
                         ctl_slotvol(dev_midi, f->slot, m->u.vol.ctl);                          ctl_slotvol(dev_midi, f->slot, m->u.vol.ctl);
                 f->rtodo = sizeof(struct amsg);                  f->rtodo = sizeof(struct amsg);
                 f->rstate = SOCK_RMSG;                  f->rstate = SOCK_RMSG;

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34