- Timestamp:
- Dec 28, 2016 3:40:07 AM (8 years ago)
- Location:
- pjproject/branches/projects/uwp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/uwp
- Property svn:mergeinfo changed
/pjproject/trunk (added) merged: 5209,5212-5234,5237-5253,5255,5257-5292,5294-5297,5299-5332,5334-5394,5396-5438,5440-5469,5471-5496,5498-5510
- Property svn:mergeinfo changed
-
pjproject/branches/projects/uwp/pjlib/src/pj/addr_resolv_sock.c
r5146 r5513 83 83 af==PJ_AF_UNSPEC, PJ_EINVAL); 84 84 85 #if PJ_WIN32_WINCE 86 85 87 /* Check if nodename is IP address */ 86 88 pj_bzero(&ai[0], sizeof(ai[0])); … … 109 111 return PJ_SUCCESS; 110 112 } 113 114 #else /* PJ_WIN32_WINCE */ 115 PJ_UNUSED_ARG(has_addr); 116 #endif 111 117 112 118 /* Copy node name to null terminated string. */ … … 146 152 /* Store address */ 147 153 addr_size = sizeof(*addr); 148 if (a f== PJ_AF_INET6) {154 if (addr->sa_family == PJ_AF_INET6) { 149 155 addr_size = addr->sa_len; 150 156 } 151 PJ_ASSERT_ON_FAIL(addr_size <= sizeof(pj_sockaddr), 157 PJ_ASSERT_ON_FAIL(addr_size <= sizeof(pj_sockaddr), continue); 152 158 pj_memcpy(&ai[i].ai_addr, addr, addr_size); 153 159 PJ_SOCKADDR_RESET_LEN(&ai[i].ai_addr); … … 158 164 159 165 *count = i; 166 if (*count == 0) 167 status = PJ_ERESOLVE; 168 160 169 } else { 161 170 status = PJ_ERESOLVE; … … 206 215 207 216 /* Done */ 208 return PJ_SUCCESS;217 return (*count > 0? PJ_SUCCESS : PJ_ERESOLVE); 209 218 #endif 210 219 … … 213 222 214 223 PJ_ASSERT_RETURN(count && *count, PJ_EINVAL); 224 225 #if PJ_WIN32_WINCE 215 226 216 227 /* Check if nodename is IP address */ … … 241 252 return PJ_SUCCESS; 242 253 } 254 255 #else /* PJ_WIN32_WINCE */ 256 PJ_UNUSED_ARG(has_addr); 257 #endif 243 258 244 259 if (af == PJ_AF_INET || af == PJ_AF_UNSPEC) { … … 274 289 } 275 290 276 return PJ_SUCCESS;291 return (*count > 0? PJ_SUCCESS : PJ_ERESOLVE); 277 292 278 293 } else {
Note: See TracChangeset
for help on using the changeset viewer.