1) Export all symbols in olsrd on Windows. 2) If the interface address is
authorThomas Lopatic <thomas@lopatic.de>
Wed, 25 May 2005 22:17:07 +0000 (22:17 +0000)
committerThomas Lopatic <thomas@lopatic.de>
Wed, 25 May 2005 22:17:07 +0000 (22:17 +0000)
zero, then consider the interface to be down.

make/Makefile.win32
src/win32/ifnet.c

index 3d949a5..c00dddf 100644 (file)
@@ -13,7 +13,7 @@ ifdef OLSRD_PLUGIN
 endif
 
 DEFINES +=     -DWIN32
-LIBS +=                -mno-cygwin -lws2_32 -liphlpapi
+LIBS +=                -mno-cygwin -Wl,--out-implib=libolsrd.a -Wl,--export-all-symbols -lws2_32 -liphlpapi
 
 INCLUDES +=    -I$(TOPDIR)/src/win32
 CFLAGS +=      -mno-cygwin
index 287677a..f5e8067 100644 (file)
@@ -36,7 +36,7 @@
  * to the project. For more information see the website or contact
  * the copyright holders.
  *
- * $Id: ifnet.c,v 1.23 2005/03/21 02:17:36 tlopatic Exp $
+ * $Id: ifnet.c,v 1.24 2005/05/25 22:17:07 tlopatic Exp $
  */
 
 #include "interfaces.h"
@@ -216,8 +216,9 @@ int GetIntInfo(struct InterfaceInfo *Info, char *Name)
 
   strcpy(Info->Guid, Walker->AdapterName);
 
-  if (IfTable->table[TabIdx].dwOperStatus != MIB_IF_OPER_STATUS_CONNECTED &&
-      IfTable->table[TabIdx].dwOperStatus != MIB_IF_OPER_STATUS_OPERATIONAL)
+  if ((IfTable->table[TabIdx].dwOperStatus != MIB_IF_OPER_STATUS_CONNECTED &&
+      IfTable->table[TabIdx].dwOperStatus != MIB_IF_OPER_STATUS_OPERATIONAL) ||
+      Info->Addr == 0)
   {
     OLSR_PRINTF(3, "Interface %s not up!\n", Name);
     return -1;