Changeset 9fae46b
- Timestamp:
- 02/28/06 15:30:47 (16 years ago)
- 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:
- 4aa4615
- Parents:
- 5b66921
- Location:
- lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/format_erf.c
r0d57541 r9fae46b 155 155 #ifdef HAVE_DAG 156 156 static int dag_init_input(struct libtrace_t *libtrace) { 157 libtrace->format_data = (struct libtrace_format_data_t *) 158 malloc(sizeof(struct libtrace_format_data_t)); 157 libtrace->format_data = (struct erf_format_data_t *) 158 malloc(sizeof(struct erf_format_data_t)); 159 return 0; 159 160 } 160 161 -
lib/format_rt.c
rc26ca86 r9fae46b 114 114 if ((he=gethostbyname(RT_INFO->hostname)) == NULL) { 115 115 perror("gethostbyname"); 116 return 0;116 return -1; 117 117 } 118 118 if ((RT_INFO->input_fd = socket(AF_INET, SOCK_STREAM, 0)) == -1) { 119 119 perror("socket"); 120 return 0;120 return -1; 121 121 } 122 122 … … 129 129 sizeof(struct sockaddr)) == -1) { 130 130 perror("connect (inet)"); 131 return 0;131 return -1; 132 132 } 133 133 … … 136 136 if (recv(RT_INFO->input_fd, &connect_msg, sizeof(rt_header_t), 0) != sizeof(rt_header_t) ) { 137 137 printf("An error occured while connecting to %s\n", RT_INFO->hostname); 138 return 0;138 return -1; 139 139 } 140 140 … … 150 150 printf("Connection attempt is denied by the server: %s\n", 151 151 rt_deny_reason(reason)); 152 return 0;152 return -1; 153 153 case RT_HELLO: 154 154 /* do something with options */ … … 162 162 reliability = hello_opts.reliable; 163 163 164 return 1;164 return 0; 165 165 default: 166 166 printf("Unexpected message type: %d\n", connect_msg.type); 167 return 0;168 } 169 170 return 0;167 return -1; 168 } 169 170 return -1; 171 171 } 172 172
Note: See TracChangeset
for help on using the changeset viewer.