comparison libfdcore/p_psm.c @ 1085:7d7266115a34

Cleaning of the traces in progress
author Sebastien Decugis <sdecugis@freediameter.net>
date Fri, 03 May 2013 19:20:56 +0800
parents 74bba7975864
children d8591b1c56cd
comparison
equal deleted inserted replaced
1084:6b7966ea27fb 1085:7d7266115a34
451 TRACE_DEBUG(INFO, "Invalid event received in PSM '%s' : %d", peer->p_hdr.info.pi_diamid, event); 451 TRACE_DEBUG(INFO, "Invalid event received in PSM '%s' : %d", peer->p_hdr.info.pi_diamid, event);
452 ASSERT(0); /* we should investigate this situation */ 452 ASSERT(0); /* we should investigate this situation */
453 goto psm_loop; 453 goto psm_loop;
454 } 454 }
455 455
456 /* Handle the (easy) debug event now */
457 if (event == FDEVP_DUMP_ALL) {
458 fd_peer_dump(peer, ANNOYING);
459 goto psm_loop;
460 }
461
462 /* Requests to terminate the peer object */ 456 /* Requests to terminate the peer object */
463 if (event == FDEVP_TERMINATE) { 457 if (event == FDEVP_TERMINATE) {
464 switch (cur_state) { 458 switch (cur_state) {
465 case STATE_OPEN: 459 case STATE_OPEN:
466 case STATE_OPEN_NEW: 460 case STATE_OPEN_NEW:
709 CHECK_FCT_DO( fd_ep_clearflags( &peer->p_hdr.info.pi_endpoints, EP_FL_PRIMARY ), /* ignore the error */); 703 CHECK_FCT_DO( fd_ep_clearflags( &peer->p_hdr.info.pi_endpoints, EP_FL_PRIMARY ), /* ignore the error */);
710 704
711 /* Get the new ones */ 705 /* Get the new ones */
712 CHECK_FCT_DO( fd_cnx_getremoteeps(peer->p_cnxctx, &peer->p_hdr.info.pi_endpoints), /* ignore the error */); 706 CHECK_FCT_DO( fd_cnx_getremoteeps(peer->p_cnxctx, &peer->p_hdr.info.pi_endpoints), /* ignore the error */);
713 707
714 /* We do not support local endpoints change currently, but it could be added here if needed (refresh fd_g_config->cnf_endpoints)*/ 708 /* We do not support local endpoints change currently, but it could be added here if needed (refresh fd_g_config->cnf_endpoints) */
715 709 {
716 if (TRACE_BOOL(ANNOYING)) { 710 char * buf = NULL;
717 TRACE_DEBUG(ANNOYING, "New remote endpoint(s):" ); 711 size_t len = 0;
718 fd_ep_dump(6, &peer->p_hdr.info.pi_endpoints); 712 LOG_D("New remote endpoint(s): %s", fd_ep_dump(&buf, &len, NULL, 6, &peer->p_hdr.info.pi_endpoints) ?: "error");
713 free(buf);
719 } 714 }
720 715
721 /* Done */ 716 /* Done */
722 goto psm_loop; 717 goto psm_loop;
723 } 718 }
"Welcome to our mercurial repository"