diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2017-03-03 17:50:22 -0300 | 
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2017-03-03 17:50:22 -0300 | 
| commit | adbdf4653f3a408900c6be58fbdf497c0439a84e (patch) | |
| tree | aa8c7de884c844ff0f8ed5fe002c4ce0bd67f096 /ldpd/packet.c | |
| parent | 05aac414e69068748a8e6d6f7e3b0bdb74677039 (diff) | |
ldpd: kill send_notification_nbr()
Be more clever and trigger the PDU SENT event inside send_notification()
when tcp->nbr is set. This way we can eliminate send_notification_nbr()
and always use send_notification() instead.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ldpd/packet.c')
| -rw-r--r-- | ldpd/packet.c | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/ldpd/packet.c b/ldpd/packet.c index b085cac055..653f67b8c2 100644 --- a/ldpd/packet.c +++ b/ldpd/packet.c @@ -564,7 +564,7 @@ session_read(struct thread *thread)  				log_debug("%s: unknown LDP message from nbr %s",  				    __func__, inet_ntoa(nbr->id));  				if (!(ntohs(msg->type) & UNKNOWN_FLAG)) -					send_notification_nbr(nbr, +					send_notification(nbr->tcp,  					    S_UNKNOWN_MSG, msg->id, msg->type);  				/* ignore the message */  				ret = 0; @@ -632,7 +632,7 @@ session_shutdown(struct nbr *nbr, uint32_t status, uint32_t msg_id,  	case NBR_STA_OPER:  		log_debug("%s: lsr-id %s", __func__, inet_ntoa(nbr->id)); -		send_notification_nbr(nbr, status, msg_id, msg_type); +		send_notification(nbr->tcp, status, msg_id, msg_type);  		nbr_fsm(nbr, NBR_EVT_CLOSE_SESSION);  		break; @@ -788,7 +788,7 @@ pending_conn_timeout(struct thread *thread)  	 * notification message reliably.  	 */  	tcp = tcp_new(pconn->fd, NULL); -	send_notification(S_NO_HELLO, tcp, 0, 0); +	send_notification(tcp, S_NO_HELLO, 0, 0);  	msgbuf_write(&tcp->wbuf.wbuf);  	pending_conn_del(pconn);  | 
