Explorar el Código

【修改】网卡检查时间为 2s,删除操作链表前的关中断

SummerGift hace 6 años
padre
commit
9ffd128b2a
Se han modificado 2 ficheros con 1 adiciones y 13 borrados
  1. 1 1
      src/lssdp.c
  2. 0 12
      src/lssdp_service.c

+ 1 - 1
src/lssdp.c

@@ -110,7 +110,7 @@ int lssdp_network_interface_update(lssdp_ctx * lssdp) {
     extern struct netdev *netdev_default;
     while(netdev_default == NULL)
     {
-        rt_thread_mdelay(5000);
+        rt_thread_mdelay(2000);
         lssdp_error("Can't find default net device, please check the network driver.\r\n");
     }
 

+ 0 - 12
src/lssdp_service.c

@@ -28,9 +28,6 @@ static int lssdp_service_register(struct lssdp_service *h)
     if (h == RT_NULL)
         return -RT_ERROR;
 
-    /* enter interrupt */
-    rt_interrupt_enter();
-
     rt_slist_for_each(head, &_lssdp_list)
     {
         if (rt_strcmp(h->name, ((lssdp_service_t)head)->name) == 0)
@@ -43,9 +40,6 @@ static int lssdp_service_register(struct lssdp_service *h)
     rt_slist_init(&h->list);
     rt_slist_append(&_lssdp_list, &h->list);
 
-    /* leave interrupt */
-    rt_interrupt_leave();
-
     return RT_EOK;
 }
 
@@ -57,9 +51,6 @@ static int lssdp_service_unregister(struct lssdp_service *h)
     if (h == RT_NULL)
         return -RT_ERROR;
 
-    /* enter interrupt */
-    rt_interrupt_enter();
-
     rt_slist_for_each(head, &_lssdp_list)
     {
         if (rt_strcmp(h->name, ((lssdp_service_t)head)->name) == 0)
@@ -70,9 +61,6 @@ static int lssdp_service_unregister(struct lssdp_service *h)
         }
     }
 
-    /* leave interrupt */
-    rt_interrupt_leave();
-
     LOG_E("Can't find service name %s to unregister", h->name);
 
     return -RT_ERROR;