Changeset 362c5f2 for lib/format_rt.c


Ignore:
Timestamp:
06/23/06 17:15:57 (15 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
6a18893
Parents:
d8fea2b
Message:

Added some better error checking to the connection stage of format_rt
Fixed outdated documentation in libtrace.h
Removed warning about demote_packet in format_erf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_rt.c

    racc80de r362c5f2  
    102102       
    103103        if ((he=gethostbyname(RT_INFO->hostname)) == NULL) {
    104                 perror("gethostbyname");
    105                 return -1;
     104                trace_set_err(libtrace, TRACE_ERR_INIT_FAILED,
     105                                "Failed to convert hostname %s to address",
     106                                RT_INFO->hostname);
     107                return -1;
    106108        }
    107109        if ((RT_INFO->input_fd = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
    108                 perror("socket");
    109                 return -1;
     110                trace_set_err(libtrace, TRACE_ERR_INIT_FAILED,
     111                                "Could not create socket");
     112                return -1;
    110113        }
    111114
Note: See TracChangeset for help on using the changeset viewer.