Changeset 56 for trunk/oscam.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/oscam.c

    r41 r56  
    186186  unsigned short n;
    187187  if (!pfd) return(-9);
    188   read(pfd, buf, 3);
     188  if (!read(pfd, buf, 3)) cs_exit(1);
    189189  if (buf[0]!='U')
    190190  {
     
    733733  {
    734734    sad.sin_addr.s_addr=ph->s_ip;
    735     sprintf(ptxt[0], ", ip=%s", inet_ntoa(ph->s_ip));
     735    sprintf(ptxt[0], ", ip=%s", inet_ntoa(sad.sin_addr));
    736736  }
    737737  else
     
    777777  if (cfg->netprio)
    778778    if (!setsockopt(ph->ptab->ports[port_idx].fd, SOL_SOCKET, SO_PRIORITY, (void *)&cfg->netprio, sizeof(ulong)))
    779       sprintf(ptxt[1], ", prio=%d", cfg->netprio);
     779      sprintf(ptxt[1], ", prio=%ld", cfg->netprio);
    780780#endif
    781781
     
    12531253        er=(ECM_REQUEST *)(buf+3+sizeof(int));
    12541254        if( er->cidx && client[er->cidx].fd_m2c )
    1255             write(client[er->cidx].fd_m2c, buf, l+3+sizeof(int));
     1255            if (!write(client[er->cidx].fd_m2c, buf, l+3+sizeof(int))) cs_exit(1);
    12561256        rc=PIP_ID_DIR;
    12571257      }
     
    21112111                  buf[0]='U';
    21122112                  memcpy(buf+1, &rl, 2);
    2113                   write(client[idx].ufd, buf, n+3);
     2113                  if (!write(client[idx].ufd, buf, n+3)) cs_exit(1);
    21142114                }
    21152115              }
Note: See TracChangeset for help on using the changeset viewer.