Changeset 362c5f2


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

Location:
lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • lib/format_erf.c

    r0ff6ddf r362c5f2  
    941941                do {
    942942                        type=libtrace_to_erf_type(trace_get_link_type(packet));
    943                 } while(type==(char)-1 && demote_packet(packet));
     943                } while(type==(char)-1 && demote_packet((libtrace_packet_t *)packet));
    944944                /* We just don't support this link type sorry */
    945945                if (type==(char)-1) {
  • 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
  • lib/libtrace.h.in

    rc5ebbaa r362c5f2  
    11431143 * @return opaque pointer pointer to a libtrace_filter_t object
    11441144 * @note The filter is not actually compiled at this point, so no correctness
    1145  * tests are performed here. trace_bpf_setfilter will always return ok, but
     1145 * tests are performed here. trace_create_filter will always return ok, but
    11461146 * if the filter is poorly constructed an error will be generated when the
    11471147 * filter is actually used
Note: See TracChangeset for help on using the changeset viewer.