[TIPC} Fixed bug in disc_timeout()
authorJon Maloy <jon.maloy@ericsson.com>
Tue, 10 Jan 2006 18:54:24 +0000 (18:54 +0000)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 12 Jan 2006 22:06:33 +0000 (14:06 -0800)
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
net/tipc/discover.c
net/tipc/netlink.c

index c83c1be17f85aa1d7c26a1558a8447358d6a03f6..73e151cf2a514f7777ba2bfef59582bd88f977d9 100644 (file)
@@ -258,32 +258,8 @@ void disc_update_link_req(struct link_req *req)
 
 static void disc_timeout(struct link_req *req) 
 {
-       struct tipc_msg *msg = buf_msg(req->buf);
-
        spin_lock_bh(&req->bearer->publ.lock);
 
-#if 0
-       /* CURRENTLY DON'T SUPPORT INTER-ZONE LINKS */
-       u32 dest_domain = msg_dest_domain(msg);
-       int stop = 0;
-       if (!in_scope(dest_domain, tipc_own_addr)) {
-               struct _zone *z_ptr = zone_find(dest_domain);
-
-               if (z_ptr && (z_ptr->links >= msg_req_links(msg)))
-                       stop = 1;
-               if (req->timer_intv >= 32000)
-                       stop = 1;
-       }
-       if (stop) {
-               k_cancel_timer(&req->timer);
-               buf_discard(req->buf);
-               kfree(req);
-               spin_unlock_bh(&req->bearer->publ.lock);
-               return;
-       }
-#endif
-
-       msg_dbg(msg,"SEND:");
        req->bearer->media->send_msg(req->buf, &req->bearer->publ, &req->dest);
 
        if ((req->timer_intv == TIPC_LINK_REQ_SLOW) ||
@@ -291,8 +267,8 @@ static void disc_timeout(struct link_req *req)
                /* leave timer interval "as is" if already at a "normal" rate */
        } else {
                req->timer_intv *= 2;
-               if (req->timer_intv > TIPC_LINK_REQ_FAST)
-                       req->timer_intv = TIPC_LINK_REQ_FAST;
+               if (req->timer_intv > TIPC_LINK_REQ_SLOW)
+                       req->timer_intv = TIPC_LINK_REQ_SLOW;
                if ((req->timer_intv == TIPC_LINK_REQ_FAST) && 
                    (req->bearer->nodes.count))
                        req->timer_intv = TIPC_LINK_REQ_SLOW;
index 08b974ed9109be7e315d1df57a5b252f8d17bef1..2d778dfc449273f53403a1f0f92377be40eaf82c 100644 (file)
@@ -80,6 +80,8 @@ static int family_registered = 0;
 
 int netlink_start(void)
 {
+
+
        if (genl_register_family(&family))
                goto err;
 
@@ -88,7 +90,7 @@ int netlink_start(void)
        if (genl_register_ops(&family, &ops))
                goto err_unregister;
 
-       return 0;
+        return 0;
 
  err_unregister:
        genl_unregister_family(&family);