aboutsummaryrefslogtreecommitdiff
path: root/src/gns/w32nsp.c
diff options
context:
space:
mode:
authorLRN <lrn1986@gmail.com>2013-12-19 18:39:19 +0000
committerLRN <lrn1986@gmail.com>2013-12-19 18:39:19 +0000
commit151b93ed4d318ee67cf0dccdcb219556fb4919b9 (patch)
treeeaad926d26ec573f87b7f14bd93e0f0747148120 /src/gns/w32nsp.c
parent706ee768b1d29aad1f1a8bcf42166edf700ee54a (diff)
downloadgnunet-151b93ed4d318ee67cf0dccdcb219556fb4919b9.tar.gz
gnunet-151b93ed4d318ee67cf0dccdcb219556fb4919b9.zip
Remove unused macros, use a different error code for early bailouts
Diffstat (limited to 'src/gns/w32nsp.c')
-rw-r--r--src/gns/w32nsp.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/gns/w32nsp.c b/src/gns/w32nsp.c
index 5ad9fc753..6370f64bf 100644
--- a/src/gns/w32nsp.c
+++ b/src/gns/w32nsp.c
@@ -77,13 +77,6 @@
77#define NSPAPI_VERSION_MAJOR 4 77#define NSPAPI_VERSION_MAJOR 4
78#define NSPAPI_VERSION_MINOR 4 78#define NSPAPI_VERSION_MINOR 4
79 79
80#define REPLY_LIFETIME 60*5
81
82#define STATE_BEGIN 0x01
83#define STATE_END 0x02
84#define STATE_REPLY 0x04
85#define STATE_GHBN 0x08
86
87static CRITICAL_SECTION records_cs; 80static CRITICAL_SECTION records_cs;
88 81
89struct record 82struct record
@@ -318,7 +311,7 @@ GNUNET_W32NSP_LookupServiceBegin (LPGUID lpProviderId, LPWSAQUERYSETW lpqsRestri
318 if (lpqsRestrictions->dwNameSpace != NS_DNS && lpqsRestrictions->dwNameSpace != NS_ALL) 311 if (lpqsRestrictions->dwNameSpace != NS_DNS && lpqsRestrictions->dwNameSpace != NS_ALL)
319 { 312 {
320 DEBUGLOG ("GNUNET_W32NSP_LookupServiceBegin: wrong namespace\n"); 313 DEBUGLOG ("GNUNET_W32NSP_LookupServiceBegin: wrong namespace\n");
321 SetLastError (WSANO_DATA); 314 SetLastError (WSAEINVAL);
322 return SOCKET_ERROR; 315 return SOCKET_ERROR;
323 } 316 }
324 if (lpqsRestrictions->lpszServiceInstanceName != NULL) 317 if (lpqsRestrictions->lpszServiceInstanceName != NULL)
@@ -334,7 +327,7 @@ GNUNET_W32NSP_LookupServiceBegin (LPGUID lpProviderId, LPWSAQUERYSETW lpqsRestri
334 else 327 else
335 { 328 {
336 DEBUGLOG ("GNUNET_W32NSP_LookupServiceBegin: unsupported TLD\n"); 329 DEBUGLOG ("GNUNET_W32NSP_LookupServiceBegin: unsupported TLD\n");
337 SetLastError (WSANO_DATA); 330 SetLastError (WSAEINVAL);
338 return SOCKET_ERROR; 331 return SOCKET_ERROR;
339 } 332 }
340 } 333 }