Changeset 1078:74bba7975864 in freeDiameter for libfdcore/p_out.c
- Timestamp:
- Apr 30, 2013, 4:37:57 PM (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfdcore/p_out.c
r1027 r1078 45 45 int ret; 46 46 uint32_t bkp_hbh = 0; 47 struct timespec senton;48 47 struct msg * cpy_for_logs_only; 49 48 … … 73 72 } 74 73 75 CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &senton), /* ... */ );76 CHECK_FCT_DO( fd_msg_ts_set_sent(cpy_for_logs_only, &senton), /* ... */ );77 78 74 /* Log the message */ 79 fd_msg_log( FD_MSG_LOG_SENT, cpy_for_logs_only, "Sent to '%s'", fd_cnx_getid(cnx)); 80 81 { 82 struct timespec rcvon, delay; 83 84 (void) fd_msg_ts_get_recv(cpy_for_logs_only, &rcvon); 85 if (rcvon.tv_sec != 0 || rcvon.tv_nsec != 0) { 86 TS_DIFFERENCE( &delay, &rcvon, &senton); 87 fd_msg_log( FD_MSG_LOG_TIMING, cpy_for_logs_only, "Forwarded in %ld.%6.6ld sec", (long)delay.tv_sec, delay.tv_nsec/1000); 88 } else { /* We log the answer time only for answers generated locally */ 89 if (!msg_is_a_req) { 90 /* get the matching request */ 91 struct msg * req; 92 struct timespec reqrcvon; 93 (void) fd_msg_answ_getq(cpy_for_logs_only, &req); 94 (void) fd_msg_ts_get_recv(req, &reqrcvon); 95 TS_DIFFERENCE( &delay, &reqrcvon, &senton); 96 fd_msg_log( FD_MSG_LOG_TIMING, cpy_for_logs_only, "Answered in %ld.%6.6ld sec", (long)delay.tv_sec, delay.tv_nsec/1000); 97 } 98 } 99 } 75 // fd_msg_log( FD_MSG_LOG_SENT, cpy_for_logs_only, "Sent to '%s'", fd_cnx_getid(cnx)); 100 76 101 77 /* Send the message */ … … 122 98 CHECK_FCT_DO(fd_fifo_post(fd_g_outgoing, &msg), 123 99 { 124 fd_msg_log( FD_MSG_LOG_DROPPED, msg, "An error occurred while attempting to requeue this message during cancellation of the sending function");100 //fd_msg_log( FD_MSG_LOG_DROPPED, msg, "An error occurred while attempting to requeue this message during cancellation of the sending function"); 125 101 CHECK_FCT_DO(fd_msg_free(msg), /* What can we do more? */); 126 102 } ); … … 155 131 { 156 132 if (msg) { 157 fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Internal error: Problem while sending (%s)", strerror(ret) );133 //fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Internal error: Problem while sending (%s)", strerror(ret) ); 158 134 fd_msg_free(msg); 159 135 } … … 207 183 { 208 184 if (msg) { 209 fd_msg_log( FD_MSG_LOG_DROPPED, *msg, "Internal error: Problem while sending (%s)", strerror(ret) );185 //fd_msg_log( FD_MSG_LOG_DROPPED, *msg, "Internal error: Problem while sending (%s)", strerror(ret) ); 210 186 fd_msg_free(*msg); 211 187 *msg = NULL;
Note: See TracChangeset
for help on using the changeset viewer.