Changeset 8ee7caa for lib


Ignore:
Timestamp:
02/20/06 14:22:11 (15 years ago)
Author:
Perry Lorier <perry@…>
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:
0a6638f
Parents:
df338b3
Message:

More assisinations of CONNINFO

Location:
lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lib/format_legacy.c

    r3d4d52d r8ee7caa  
    7575static struct libtrace_format_t legacyatm;
    7676
    77 #define CONNINFO libtrace->format_data->conn_info
    7877#define INPUT libtrace->format_data->input
    7978#define OUTPUT libtrace->format_data->output
  • lib/format_wag.c

    r3d4d52d r8ee7caa  
    7979static struct libtrace_format_t wag_trace;
    8080
    81 #define CONNINFO libtrace->format_data->conn_info
    8281#define INPUT libtrace->format_data->input
    8382#define OUTPUT libtrace->format_data->output
     
    8685struct libtrace_format_data_t {
    8786        union {
    88                 /** Information about rtclients */
    89                 struct {
    90                         char *hostname;
    91                         short port;
    92                 } rt;
    9387                char *path;             /**< information for local sockets */
    9488        } conn_info;
     
    128122        libtrace->format_data = (struct libtrace_format_data_t *)
    129123                calloc(1,sizeof(struct libtrace_format_data_t));
    130         CONNINFO.path = libtrace->uridata;
    131        
    132         if (stat(CONNINFO.path,&buf) == -1 ) {
    133                 trace_set_err(errno,"stat(%s)",CONNINFO.path);
     124       
     125        if (stat(libtrace->uridata,&buf) == -1 ) {
     126                trace_set_err(errno,"stat(%s)",libtrace->uridata);
    134127                return 0;
    135128        }
    136129        if (S_ISCHR(buf.st_mode)) {
    137130                               
    138                 INPUT.fd = open(CONNINFO.path, O_RDONLY);
     131                INPUT.fd = open(libtrace->uridata, O_RDONLY);
    139132
    140133        } else {
    141134                trace_set_err(TRACE_ERR_INIT_FAILED,
    142135                                "%s is not a valid char device",
    143                                 CONNINFO.path);
     136                                libtrace->uridata);
    144137                return 0;
    145138               
Note: See TracChangeset for help on using the changeset viewer.