diff options
Diffstat (limited to 'net/tipc/discover.c')
| -rw-r--r-- | net/tipc/discover.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/net/tipc/discover.c b/net/tipc/discover.c index 6acf32a9eef..dba47673124 100644 --- a/net/tipc/discover.c +++ b/net/tipc/discover.c | |||
| @@ -241,6 +241,17 @@ void tipc_disc_update_link_req(struct link_req *req) | |||
| 241 | } | 241 | } |
| 242 | 242 | ||
| 243 | /** | 243 | /** |
| 244 | * disc_send_msg - send link setup request message | ||
| 245 | * @req: ptr to link request structure | ||
| 246 | */ | ||
| 247 | |||
| 248 | static void disc_send_msg(struct link_req *req) | ||
| 249 | { | ||
| 250 | if (!req->bearer->blocked) | ||
| 251 | tipc_bearer_send(req->bearer, req->buf, &req->dest); | ||
| 252 | } | ||
| 253 | |||
| 254 | /** | ||
| 244 | * disc_timeout - send a periodic link setup request | 255 | * disc_timeout - send a periodic link setup request |
| 245 | * @req: ptr to link request structure | 256 | * @req: ptr to link request structure |
| 246 | * | 257 | * |
| @@ -251,7 +262,7 @@ static void disc_timeout(struct link_req *req) | |||
| 251 | { | 262 | { |
| 252 | spin_lock_bh(&req->bearer->lock); | 263 | spin_lock_bh(&req->bearer->lock); |
| 253 | 264 | ||
| 254 | req->bearer->media->send_msg(req->buf, req->bearer, &req->dest); | 265 | disc_send_msg(req); |
| 255 | 266 | ||
| 256 | if ((req->timer_intv == TIPC_LINK_REQ_SLOW) || | 267 | if ((req->timer_intv == TIPC_LINK_REQ_SLOW) || |
| 257 | (req->timer_intv == TIPC_LINK_REQ_FAST)) { | 268 | (req->timer_intv == TIPC_LINK_REQ_FAST)) { |
| @@ -300,6 +311,7 @@ int tipc_disc_create(struct tipc_bearer *b_ptr, | |||
| 300 | k_init_timer(&req->timer, (Handler)disc_timeout, (unsigned long)req); | 311 | k_init_timer(&req->timer, (Handler)disc_timeout, (unsigned long)req); |
| 301 | k_start_timer(&req->timer, req->timer_intv); | 312 | k_start_timer(&req->timer, req->timer_intv); |
| 302 | b_ptr->link_req = req; | 313 | b_ptr->link_req = req; |
| 314 | disc_send_msg(req); | ||
| 303 | return 0; | 315 | return 0; |
| 304 | } | 316 | } |
| 305 | 317 | ||
