comparison libfdcore/cnxctx.c @ 1200:8c4dd4b693c6

Some cleanups in the traces
author Sebastien Decugis <sdecugis@freediameter.net>
date Thu, 13 Jun 2013 17:30:14 +0800
parents 48759e3f7611
children ce2b00dc86c1
comparison
equal deleted inserted replaced
1199:823829bf1037 1200:8c4dd4b693c6
290 TRACE_ENTRY("%p %d", sa, addrlen); 290 TRACE_ENTRY("%p %d", sa, addrlen);
291 CHECK_PARAMS_DO( sa && addrlen, return NULL ); 291 CHECK_PARAMS_DO( sa && addrlen, return NULL );
292 292
293 fd_sa_sdump_numeric(sa_buf, sa); 293 fd_sa_sdump_numeric(sa_buf, sa);
294 294
295 LOG_D("Connecting to TCP %s...", sa_buf);
296
295 /* Create the socket and connect, which can take some time and/or fail */ 297 /* Create the socket and connect, which can take some time and/or fail */
296 { 298 {
297 int ret = fd_tcp_client( &sock, sa, addrlen ); 299 int ret = fd_tcp_client( &sock, sa, addrlen );
298 if (ret != 0) { 300 if (ret != 0) {
299 LOG_A("TCP connection to %s failed: %s", sa_buf, strerror(ret)); 301 LOG_D("TCP connection to %s failed: %s", sa_buf, strerror(ret));
300 return NULL; 302 return NULL;
301 } 303 }
302 } 304 }
303 305
304 /* Once the socket is created successfuly, prepare the remaining of the cnx */ 306 /* Once the socket is created successfuly, prepare the remaining of the cnx */
345 TRACE_ENTRY("%p", list); 347 TRACE_ENTRY("%p", list);
346 CHECK_PARAMS_DO( list && !FD_IS_LIST_EMPTY(list), return NULL ); 348 CHECK_PARAMS_DO( list && !FD_IS_LIST_EMPTY(list), return NULL );
347 349
348 fd_sa_sdump_numeric(sa_buf, &((struct fd_endpoint *)(list->next))->sa); 350 fd_sa_sdump_numeric(sa_buf, &((struct fd_endpoint *)(list->next))->sa);
349 351
352 LOG_D("Connecting to SCTP %s:%hu...", sa_buf, port);
353
350 { 354 {
351 int ret = fd_sctp_client( &sock, no_ip6, port, list ); 355 int ret = fd_sctp_client( &sock, no_ip6, port, list );
352 if (ret != 0) { 356 if (ret != 0) {
353 LOG_A("SCTP connection to [%s,...] failed: %s", sa_buf, strerror(ret)); 357 LOG_D("SCTP connection to [%s,...] failed: %s", sa_buf, strerror(ret));
354 return NULL; 358 return NULL;
355 } 359 }
356 } 360 }
357 361
358 /* Once the socket is created successfuly, prepare the remaining of the cnx */ 362 /* Once the socket is created successfuly, prepare the remaining of the cnx */
"Welcome to our mercurial repository"