From b7e4ae5eb7191aa8a29434d761a55777c4c5bbc8 Mon Sep 17 00:00:00 2001 From: alexhudson Date: Sat, 9 May 2009 10:40:29 +0000 Subject: [PATCH] Make PROPGET response codes be properly understood for now. --- src/libs/nmap/nmap.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/libs/nmap/nmap.c b/src/libs/nmap/nmap.c index fd1ed1a..703cce2 100644 --- a/src/libs/nmap/nmap.c +++ b/src/libs/nmap/nmap.c @@ -693,10 +693,8 @@ NMAPGetTextProperty(Connection *conn, uint64_t guid, const char *propertyName, c int retval = 0; if (NMAPSendCommandF(conn, "PROPGET %llx %s\r\n", guid, propertyName) != -1) { retval = ReadProperty(conn, propertyName, propertyBuffer, propertyBufferLen); - if (retval == 2001) { - if (NMAPReadJustResponseCode(conn) == 1000) { - return retval; - } + if (NMAPReadJustResponseCode(conn) == 1000) { + return retval; } } return(-1); @@ -828,10 +826,8 @@ NMAPGetDecimalProperty(Connection *conn, uint64_t guid, const char *propertyName int retval; if (NMAPSendCommandF(conn, "PROPGET %llx %s\r\n", guid, propertyName) != -1) { retval = NMAPReadDecimalPropertyResponse(conn, propertyName, propertyValue); - if (retval == 2001) { - if (NMAPReadJustResponseCode(conn) == 1000) { - return retval; - } + if (NMAPReadJustResponseCode(conn) == 1000) { + return retval; } } return(-1); @@ -894,10 +890,8 @@ NMAPGetHexadecimalProperty(Connection *conn, uint64_t guid, const char *property int retval; if (NMAPSendCommandF(conn, "PROPGET %llx %s\r\n", guid, propertyName) != -1) { retval = NMAPReadHexadecimalPropertyResponse(conn, propertyName, propertyValue); - if (retval == 2001) { - if (NMAPReadJustResponseCode(conn) == 1000) { - return retval; - } + if (NMAPReadJustResponseCode(conn) == 1000) { + return retval; } } return(-1);