Revision e81b440f proto/bgp/bgp.c

View differences:

proto/bgp/bgp.c
203 203
void
204 204
bgp_close_conn(struct bgp_conn *conn)
205 205
{
206
  struct bgp_proto *p = conn->bgp;
206
  // struct bgp_proto *p = conn->bgp;
207 207

  
208 208
  DBG("BGP: Closing connection\n");
209 209
  conn->packets_to_send = 0;
......
237 237

  
238 238
  DBG("BGP: Updating startup delay\n");
239 239

  
240
  if (p->last_proto_error && ((now - p->last_proto_error) >= cf->error_amnesia_time))
240
  if (p->last_proto_error && ((now - p->last_proto_error) >= (int) cf->error_amnesia_time))
241 241
    p->startup_delay = 0;
242 242

  
243 243
  p->last_proto_error = now;
......
492 492
}
493 493

  
494 494
static void
495
bgp_setup_sk(struct bgp_proto *p, struct bgp_conn *conn, sock *s)
495
bgp_setup_sk(struct bgp_conn *conn, sock *s)
496 496
{
497 497
  s->data = conn;
498 498
  s->err_hook = bgp_sock_err;
......
555 555
  s->tx_hook = bgp_connected;
556 556
  BGP_TRACE(D_EVENTS, "Connecting to %I from local address %I", s->daddr, s->saddr);
557 557
  bgp_setup_conn(p, conn);
558
  bgp_setup_sk(p, conn, s);
558
  bgp_setup_sk(conn, s);
559 559
  bgp_conn_set_state(conn, BS_CONNECT);
560 560
  if (sk_open(s))
561 561
    {
......
601 601
	      goto err;
602 602

  
603 603
	    bgp_setup_conn(p, &p->incoming_conn);
604
	    bgp_setup_sk(p, &p->incoming_conn, sk);
604
	    bgp_setup_sk(&p->incoming_conn, sk);
605 605
	    sk_set_ttl(sk, p->cf->multihop ? : 1);
606 606
	    bgp_send_open(&p->incoming_conn);
607 607
	    return 0;
......
615 615
}
616 616

  
617 617
static void
618
bgp_listen_sock_err(sock *sk, int err)
618
bgp_listen_sock_err(sock *sk UNUSED, int err)
619 619
{
620 620
  if (err == ECONNABORTED)
621 621
    log(L_WARN "BGP: Incoming connection aborted");

Also available in: Unified diff