diff options
Diffstat (limited to 'net/tipc/discover.c')
| -rw-r--r-- | net/tipc/discover.c | 17 | 
1 files changed, 4 insertions, 13 deletions
| diff --git a/net/tipc/discover.c b/net/tipc/discover.c index ecc758c6eacf..bc849f1efa16 100644 --- a/net/tipc/discover.c +++ b/net/tipc/discover.c | |||
| @@ -239,7 +239,7 @@ void tipc_disc_recv_msg(struct sk_buff *buf, struct tipc_bearer *b_ptr) | |||
| 239 | /* Accept discovery message & send response, if necessary */ | 239 | /* Accept discovery message & send response, if necessary */ | 
| 240 | link_fully_up = link_working_working(link); | 240 | link_fully_up = link_working_working(link); | 
| 241 | 241 | ||
| 242 | if ((type == DSC_REQ_MSG) && !link_fully_up && !b_ptr->blocked) { | 242 | if ((type == DSC_REQ_MSG) && !link_fully_up) { | 
| 243 | rbuf = tipc_disc_init_msg(DSC_RESP_MSG, orig, b_ptr); | 243 | rbuf = tipc_disc_init_msg(DSC_RESP_MSG, orig, b_ptr); | 
| 244 | if (rbuf) { | 244 | if (rbuf) { | 
| 245 | tipc_bearer_send(b_ptr, rbuf, &media_addr); | 245 | tipc_bearer_send(b_ptr, rbuf, &media_addr); | 
| @@ -288,16 +288,6 @@ void tipc_disc_remove_dest(struct tipc_link_req *req) | |||
| 288 | } | 288 | } | 
| 289 | 289 | ||
| 290 | /** | 290 | /** | 
| 291 | * disc_send_msg - send link setup request message | ||
| 292 | * @req: ptr to link request structure | ||
| 293 | */ | ||
| 294 | static void disc_send_msg(struct tipc_link_req *req) | ||
| 295 | { | ||
| 296 | if (!req->bearer->blocked) | ||
| 297 | tipc_bearer_send(req->bearer, req->buf, &req->dest); | ||
| 298 | } | ||
| 299 | |||
| 300 | /** | ||
| 301 | * disc_timeout - send a periodic link setup request | 291 | * disc_timeout - send a periodic link setup request | 
| 302 | * @req: ptr to link request structure | 292 | * @req: ptr to link request structure | 
| 303 | * | 293 | * | 
| @@ -322,7 +312,8 @@ static void disc_timeout(struct tipc_link_req *req) | |||
| 322 | * hold at fast polling rate if don't have any associated nodes, | 312 | * hold at fast polling rate if don't have any associated nodes, | 
| 323 | * otherwise hold at slow polling rate | 313 | * otherwise hold at slow polling rate | 
| 324 | */ | 314 | */ | 
| 325 | disc_send_msg(req); | 315 | tipc_bearer_send(req->bearer, req->buf, &req->dest); | 
| 316 | |||
| 326 | 317 | ||
| 327 | req->timer_intv *= 2; | 318 | req->timer_intv *= 2; | 
| 328 | if (req->num_nodes) | 319 | if (req->num_nodes) | 
| @@ -368,7 +359,7 @@ int tipc_disc_create(struct tipc_bearer *b_ptr, struct tipc_media_addr *dest, | |||
| 368 | k_init_timer(&req->timer, (Handler)disc_timeout, (unsigned long)req); | 359 | k_init_timer(&req->timer, (Handler)disc_timeout, (unsigned long)req); | 
| 369 | k_start_timer(&req->timer, req->timer_intv); | 360 | k_start_timer(&req->timer, req->timer_intv); | 
| 370 | b_ptr->link_req = req; | 361 | b_ptr->link_req = req; | 
| 371 | disc_send_msg(req); | 362 | tipc_bearer_send(req->bearer, req->buf, &req->dest); | 
| 372 | return 0; | 363 | return 0; | 
| 373 | } | 364 | } | 
| 374 | 365 | ||
