[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r6487 - in GNUnet/src/util: network win
From: |
gnunet |
Subject: |
[GNUnet-SVN] r6487 - in GNUnet/src/util: network win |
Date: |
Thu, 28 Feb 2008 14:13:22 -0700 (MST) |
Author: durner
Date: 2008-02-28 14:13:22 -0700 (Thu, 28 Feb 2008)
New Revision: 6487
Modified:
GNUnet/src/util/network/ip.c
GNUnet/src/util/win/win.cc
Log:
fix MinGW
Modified: GNUnet/src/util/network/ip.c
===================================================================
--- GNUnet/src/util/network/ip.c 2008-02-28 08:21:45 UTC (rev 6486)
+++ GNUnet/src/util/network/ip.c 2008-02-28 21:13:22 UTC (rev 6487)
@@ -310,7 +310,7 @@
INET_ADDRSTRLEN));
}
- identity->addr = dwIP;
+ identity->S_un.S_addr = dwIP;
GlobalFree (pTable);
GlobalFree (pAddrTable);
@@ -356,12 +356,12 @@
return GNUNET_SYSERR;
}
closesocket (s);
- identity->addr = theHost.sin_addr.S_un.S_addr;
+ *identity = theHost.sin_addr;
}
GNUNET_GE_LOG (ectx, GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | GNUNET_GE_USER,
_("GNUnet now uses the IP address %s.\n"),
- inet_ntop (AF_INET, &identity->addr, ntop_buf,
+ inet_ntop (AF_INET, identity, ntop_buf,
INET_ADDRSTRLEN));
return GNUNET_OK;
#endif
Modified: GNUnet/src/util/win/win.cc
===================================================================
--- GNUnet/src/util/win/win.cc 2008-02-28 08:21:45 UTC (rev 6486)
+++ GNUnet/src/util/win/win.cc 2008-02-28 21:13:22 UTC (rev 6487)
@@ -148,6 +148,7 @@
{
BYTE bPhysAddr[MAXLEN_PHYSADDR];
char *pszIfName = NULL;
+ char dst[INET_ADDRSTRLEN];
/* Get friendly interface name */
pAdapterInfo = (IP_ADAPTER_INFO *)
malloc(sizeof(IP_ADAPTER_INFO));
@@ -192,7 +193,7 @@
snprintf(szEntry, 1000, "%s (%d.%d.%d.%d - %I64u)",
pszIfName ? pszIfName : (char *) pTable->table[dwIfIdx].bDescr,
- GNUNET_PRIP(ntohl(dwIP)),
+ inet_ntop (AF_INET, &dwIP, dst, INET_ADDRSTRLEN),
*((unsigned long long *) bPhysAddr));
szEntry[1000] = 0;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r6487 - in GNUnet/src/util: network win,
gnunet <=