From: Ted Lemon Date: Thu, 31 Aug 2000 04:39:18 +0000 (+0000) Subject: Support ISC_R_INCOMPLETE for partial connects. X-Git-Tag: V3-BETA-2-PATCH-1~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=275082ddad1d73c8aeaf527e93491dcbe76ffaf1;p=thirdparty%2Fdhcp.git Support ISC_R_INCOMPLETE for partial connects. --- diff --git a/dhcpctl/dhcpctl.c b/dhcpctl/dhcpctl.c index cf1a60148..9fe647bb4 100644 --- a/dhcpctl/dhcpctl.c +++ b/dhcpctl/dhcpctl.c @@ -100,7 +100,9 @@ dhcpctl_status dhcpctl_connect (dhcpctl_handle *connection, status = omapi_protocol_connect (*connection, server_name, (unsigned)port, authinfo); - if (status != ISC_R_SUCCESS) { + if (status == ISC_R_SUCCESS) + return status; + if (status != ISC_R_INCOMPLETE) { omapi_object_dereference (connection, MDL); return status; } diff --git a/includes/isc/result.h b/includes/isc/result.h index 4c43564c6..8fc4a79f5 100644 --- a/includes/isc/result.h +++ b/includes/isc/result.h @@ -74,8 +74,9 @@ ISC_LANG_BEGINDECLS #define ISC_R_NOKEYS 46 #define ISC_R_KEY_UNKNOWN 47 #define ISC_R_INVALIDKEY 48 +#define ISC_R_INCOMPLETE 49 -#define ISC_R_NRESULTS 49 /* Number of results */ +#define ISC_R_NRESULTS 50 /* Number of results */ const char * isc_result_totext(isc_result_t); isc_result_t isc_result_register(unsigned int base, diff --git a/omapip/connection.c b/omapip/connection.c index 7afa1605d..aa37235fa 100644 --- a/omapip/connection.c +++ b/omapip/connection.c @@ -361,7 +361,7 @@ isc_result_t omapi_connection_connect (omapi_object_t *h) return ISC_R_UNEXPECTED; } c -> state = omapi_connection_connecting; - return ISC_R_SUCCESS; + return ISC_R_INCOMPLETE; } c -> state = omapi_connection_connected; } diff --git a/omapip/result.c b/omapip/result.c index e9a3161c4..4a855f55c 100644 --- a/omapip/result.c +++ b/omapip/result.c @@ -94,6 +94,7 @@ static const char *text[ISC_R_NRESULTS] = { "no key specified", /* 46 */ "zone TSIG key not known", /* 47 */ "invalid TSIG key", /* 48 */ + "operation in progress", /* 49 */ }; const char *isc_result_totext (isc_result_t result)