Ignore:
Timestamp:
04/08/13 15:07:07 (11 years ago)
Author:
tbretz
Message:
Updated to v20r7.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/dim/src/tcpip.c

    r13995 r15282  
    290290                if(DIM_IO_path[0] == -1)
    291291                {
    292                         if( (DIM_IO_path[0] = socket(AF_INET, SOCK_STREAM, 0)) == -1 )
     292                        if( (DIM_IO_path[0] = (int)socket(AF_INET, SOCK_STREAM, 0)) == -1 )
    293293                        {
    294294                                perror("socket");
     
    369369                closesock(DIM_IO_path[0]);
    370370                DIM_IO_path[0] = -1;
    371                 if( (DIM_IO_path[0] = socket(AF_INET, SOCK_STREAM, 0)) == -1 )
     371                if( (DIM_IO_path[0] = (int)socket(AF_INET, SOCK_STREAM, 0)) == -1 )
    372372                {
    373373                        perror("socket");
     
    568568static int get_bytes_to_read(int conn_id)
    569569{
    570         int i, ret, count;
     570        int i, ret, count = 0;
    571571       
    572572        for(i = 0; i < 3; i++)
     
    616616                would this be better? not sure afterwards...
    617617                nbytes = (size < count) ? size : count;
    618                 if( (len = readsock(Net_conns[conn_id].channel, p, nbytes, 0)) <= 0 )
    619 */
    620                 if( (len = readsock(Net_conns[conn_id].channel, p, size, 0)) <= 0 )
     618                if( (len = readsock(Net_conns[conn_id].channel, p, (size_t)nbytes, 0)) <= 0 )
     619*/
     620                if( (len = (int)readsock(Net_conns[conn_id].channel, p, (size_t)size, 0)) <= 0 )
    621621                {       /* Connection closed by other side. */
    622622                        Net_conns[conn_id].read_rout( conn_id, -1, 0 );
     
    654654
    655655        othersize = sizeof(other);
    656         memset( (char *) &other, 0, othersize );
    657         Net_conns[conn_id].mbx_channel = accept( Net_conns[conn_id].channel,
     656        memset( (char *) &other, 0, (size_t)othersize );
     657        Net_conns[conn_id].mbx_channel = (int)accept( Net_conns[conn_id].channel,
    658658                                                 (struct sockaddr*)&other, (unsigned int *)&othersize );
    659659        if( Net_conns[conn_id].mbx_channel < 0 )
     
    842842int ret;
    843843
    844         ptr = (unsigned char *)node+strlen(node)+1;
     844        ptr = (unsigned char *)node+(int)strlen(node)+1;
    845845    ipaddr[0] = *ptr++;
    846846    ipaddr[1] = *ptr++;
     
    900900        {
    901901                sscanf(node,"%d.%d.%d.%d",&a, &b, &c, &d);
    902             ipaddr[0] = a;
    903             ipaddr[1] = b;
    904             ipaddr[2] = c;
    905             ipaddr[3] = d;
     902            ipaddr[0] = (unsigned char)a;
     903            ipaddr[1] = (unsigned char)b;
     904            ipaddr[2] = (unsigned char)c;
     905            ipaddr[3] = (unsigned char)d;
    906906            host_number = 1;
    907907#ifndef VxWorks
     
    928928                host_number = 1;
    929929/*
    930           ptr = (unsigned char *)node+strlen(node)+1;
     930          ptr = (unsigned char *)node+(int)strlen(node)+1;
    931931          ipaddr[0] = *ptr++;
    932932          ipaddr[1] = *ptr++;
     
    961961#endif
    962962
    963         if( (path = socket(AF_INET, SOCK_STREAM, 0)) == -1 )
     963        if( (path = (int)socket(AF_INET, SOCK_STREAM, 0)) == -1 )
    964964        {
    965965                perror("socket");
     
    10531053
    10541054    dim_tcpip_init(0);
    1055         if( (path = socket(AF_INET, SOCK_STREAM, 0)) == -1 )
     1055        if( (path = (int)socket(AF_INET, SOCK_STREAM, 0)) == -1 )
    10561056        {
    10571057                return(0);
     
    12571257        int     wrote;
    12581258
    1259         wrote = writesock( Net_conns[conn_id].channel, buffer, size, 0 );
     1259        wrote = (int)writesock( Net_conns[conn_id].channel, buffer, (size_t)size, 0 );
    12601260        if( wrote == -1 ) {
    12611261/*
     
    13061306       
    13071307        set_non_blocking(Net_conns[conn_id].channel);
    1308         wrote = writesock( Net_conns[conn_id].channel, buffer, size, 0 );
     1308        wrote = (int)writesock( Net_conns[conn_id].channel, buffer, (size_t)size, 0 );
    13091309#ifndef WIN32
    13101310        ret = errno;
     
    13321332                        if(selret > 0)
    13331333                        {
    1334                                 wrote = writesock( Net_conns[conn_id].channel, buffer, size, 0 );
     1334                                wrote = (int)writesock( Net_conns[conn_id].channel, buffer, (size_t)size, 0 );
    13351335                                if( wrote == -1 )
    13361336                                {
Note: See TracChangeset for help on using the changeset viewer.