Changeset 56 for trunk/module-monitor.c


Ignore:
Timestamp:
04/06/09 23:08:50 (12 years ago)
Author:
smurzch2
Message:

Appliy patch from C.H.A.D.o/streamboard.

  • clean some warnings with gcc 4.3.3
  • revert old prid in newcamd protocol (for me, new not working).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/module-monitor.c

    r8 r56  
    146146      memcpy(bbuf, buf+bsize, bpos=n-bsize);
    147147      n=bsize;
    148       write(client[cs_idx].ufd, nbuf, sizeof(nbuf));    // trigger new event
     148      if (!write(client[cs_idx].ufd, nbuf, sizeof(nbuf))) cs_exit(1);   // trigger new event
    149149    }
    150150    else if (n<bsize)
     
    171171      memcpy(bbuf, p+1, bpos);
    172172      n=p-buf;
    173       write(client[cs_idx].ufd, nbuf, sizeof(nbuf));    // trigger new event
     173      if (!write(client[cs_idx].ufd, nbuf, sizeof(nbuf))) cs_exit(1);   // trigger new event
    174174    }
    175175  }
     
    194194    else
    195195      counter++;
    196     sprintf(buf, "%03.3d", counter);
     196    sprintf(buf, "%03d", counter);
    197197    memcpy(txt+4, buf, 3);
    198198    txt[3]='0'+seq;
     
    388388  monitor_send_details(buf, pid);
    389389
    390   sprintf(buf, "client timeout=%d sec, cache delay=%d msec", cfg->ctimeout, cfg->delay);
     390  sprintf(buf, "client timeout=%d sec, cache delay=%ld msec", cfg->ctimeout, cfg->delay);
    391391  monitor_send_details(buf, pid);
    392392
     
    485485    {
    486486      char sbuf[8];
    487       sprintf(sbuf, "%03.3d", client[cs_idx].logcounter);
     487      sprintf(sbuf, "%03d", client[cs_idx].logcounter);
    488488      client[cs_idx].logcounter=(client[cs_idx].logcounter+1) % 1000;
    489489      memcpy(p_txt+4, sbuf, 3);
Note: See TracChangeset for help on using the changeset viewer.