comparison freeDiameter/p_out.c @ 455:7250e91f0662

Some additional flush enforcement to attempt to avoid some possible problems
author Sebastien Decugis <sdecugis@nict.go.jp>
date Thu, 29 Jul 2010 16:42:29 +0900
parents f1484823cb4a
children
comparison
equal deleted inserted replaced
454:f1484823cb4a 455:7250e91f0662
119 pthread_cleanup_push(cleanup_requeue, msg); 119 pthread_cleanup_push(cleanup_requeue, msg);
120 120
121 /* Send the message, log any error */ 121 /* Send the message, log any error */
122 CHECK_FCT_DO( do_send(&msg, 0, peer->p_cnxctx, &peer->p_hbh, &peer->p_sr), 122 CHECK_FCT_DO( do_send(&msg, 0, peer->p_cnxctx, &peer->p_hbh, &peer->p_sr),
123 { 123 {
124 fd_log_debug("An error occurred while sending this message, it is lost:\n"); 124 if (msg) {
125 fd_msg_dump_walk(NONE, msg); 125 fd_log_debug("An error occurred while sending this message, it was lost:\n");
126 fd_msg_free(msg); 126 fd_msg_dump_walk(NONE, msg);
127 fd_msg_free(msg);
128 }
127 } ); 129 } );
128 130
129 /* Loop */ 131 /* Loop */
130 pthread_cleanup_pop(0); 132 pthread_cleanup_pop(0);
131 } 133 }
158 cnx = peer->p_cnxctx; 160 cnx = peer->p_cnxctx;
159 161
160 /* Do send the message */ 162 /* Do send the message */
161 CHECK_FCT_DO( do_send(msg, flags, cnx, hbh, peer ? &peer->p_sr : NULL), 163 CHECK_FCT_DO( do_send(msg, flags, cnx, hbh, peer ? &peer->p_sr : NULL),
162 { 164 {
163 fd_log_debug("An error occurred while sending this message, it is lost:\n"); 165 if (msg) {
164 fd_msg_dump_walk(NONE, *msg); 166 fd_log_debug("An error occurred while sending this message, it was lost:\n");
165 fd_msg_free(*msg); 167 fd_msg_dump_walk(NONE, *msg);
166 *msg = NULL; 168 fd_msg_free(*msg);
169 *msg = NULL;
170 }
167 } ); 171 } );
168 } 172 }
169 173
170 return 0; 174 return 0;
171 } 175 }
"Welcome to our mercurial repository"