Changeset 1207:043b894b0511 in freeDiameter for libfdcore/peers.c
- Timestamp:
- Jun 14, 2013, 6:30:42 PM (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfdcore/peers.c
r1201 r1207 78 78 fd_list_init(&p->p_expiry, p); 79 79 CHECK_FCT( fd_fifo_new(&p->p_tosend, 5) ); 80 CHECK_FCT( fd_fifo_new(&p->p_tofailover, 0) ); 80 81 p->p_hbh = lrand48(); 81 82 … … 233 234 } 234 235 235 /* Empty the lists of p_tosend and p_sentreq messages */236 /* Empty the lists of p_tosend, p_failover, and p_sentreq messages */ 236 237 void fd_peer_failover_msg(struct fd_peer * peer) 237 238 { … … 258 259 } 259 260 261 /* Requeue all messages in the "failover" queue */ 262 while ( fd_fifo_tryget(peer->p_tofailover, &m) == 0 ) { 263 fd_hook_call(HOOK_MESSAGE_FAILOVER, m, peer, NULL, fd_msg_pmdl_get(m)); 264 CHECK_FCT_DO(fd_fifo_post_noblock(fd_g_outgoing, (void *)&m), 265 { 266 /* fallback: destroy the message */ 267 fd_hook_call(HOOK_MESSAGE_DROPPED, m, NULL, "Internal error: unable to requeue this message during failover process", fd_msg_pmdl_get(m)); 268 CHECK_FCT_DO(fd_msg_free(m), /* What can we do more? */) 269 } ); 270 } 271 260 272 /* Requeue all routable sent requests */ 261 273 fd_p_sr_failover(&peer->p_sr); … … 335 347 336 348 CHECK_FCT_DO( fd_fifo_del(&p->p_tosend), /* continue */ ); 349 CHECK_FCT_DO( fd_fifo_del(&p->p_tofailover), /* continue */ ); 337 350 CHECK_POSIX_DO( pthread_mutex_destroy(&p->p_state_mtx), /* continue */); 338 351 CHECK_POSIX_DO( pthread_mutex_destroy(&p->p_sr.mtx), /* continue */);
Note: See TracChangeset
for help on using the changeset viewer.