Changeset 1119
- Timestamp:
- Mar 30, 2007 6:54:46 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pj/ip_helper_win32.c
r1111 r1119 45 45 * error 22 ("Not Enough Buffer") error. 46 46 */ 47 MIB_IPADDRTABLE ipTabBuff[4];47 char ipTabBuff[1024]; 48 48 MIB_IPADDRTABLE *pTab; 49 49 ULONG tabSize; … … 53 53 PJ_ASSERT_RETURN(p_cnt && ifs, PJ_EINVAL); 54 54 55 pTab = ipTabBuff;55 pTab = (MIB_IPADDRTABLE*)ipTabBuff; 56 56 57 57 /* Get IP address table */ 58 58 tabSize = sizeof(ipTabBuff); 59 rc = GetIpAddrTable( ipTabBuff, &tabSize, FALSE);59 rc = GetIpAddrTable(pTab, &tabSize, FALSE); 60 60 if (rc != NO_ERROR) 61 61 return PJ_RETURN_OS_ERROR(rc); … … 86 86 pj_ip_route_entry routes[]) 87 87 { 88 MIB_IPADDRTABLE ipTabBuff[4];88 char ipTabBuff[1024]; 89 89 MIB_IPADDRTABLE *pIpTab; 90 MIB_IPFORWARDTABLE rtabBuff[4];90 char rtabBuff[1024]; 91 91 MIB_IPFORWARDTABLE *prTab; 92 92 ULONG tabSize; … … 96 96 PJ_ASSERT_RETURN(p_cnt && routes, PJ_EINVAL); 97 97 98 pIpTab = ipTabBuff;99 prTab = rtabBuff;98 pIpTab = (MIB_IPADDRTABLE *)ipTabBuff; 99 prTab = (MIB_IPFORWARDTABLE *)rtabBuff; 100 100 101 101 /* First get IP address table */ 102 102 tabSize = sizeof(ipTabBuff); 103 rc = GetIpAddrTable( ipTabBuff, &tabSize, FALSE);103 rc = GetIpAddrTable(pIpTab, &tabSize, FALSE); 104 104 if (rc != NO_ERROR) 105 105 return PJ_RETURN_OS_ERROR(rc); … … 107 107 /* Next get IP route table */ 108 108 tabSize = sizeof(rtabBuff); 109 rc = GetIpForwardTable( rtabBuff, &tabSize, 1);109 rc = GetIpForwardTable(prTab, &tabSize, 1); 110 110 if (rc != NO_ERROR) 111 111 return PJ_RETURN_OS_ERROR(rc);
Note: See TracChangeset
for help on using the changeset viewer.