diff options
author | Ted Lemon <source@isc.org> | 2000-05-15 15:44:31 +0000 |
---|---|---|
committer | Ted Lemon <source@isc.org> | 2000-05-15 15:44:31 +0000 |
commit | ffc0586664a6d4fa19acf7beff46df12fd800ca8 (patch) | |
tree | 7f997cdd889f3d9e2fa8c20e57cd14845b0e8bc1 /omapip/protocol.c | |
parent | 76d5bd36c8dd795dc83d797f35aada81ab1d13ff (diff) | |
download | isc-dhcp-ffc0586664a6d4fa19acf7beff46df12fd800ca8.tar.gz |
Don't send the intro until we receive the connect signal.
Diffstat (limited to 'omapip/protocol.c')
-rw-r--r-- | omapip/protocol.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/omapip/protocol.c b/omapip/protocol.c index 65d1ce8c..d33ab76f 100644 --- a/omapip/protocol.c +++ b/omapip/protocol.c @@ -76,15 +76,6 @@ isc_result_t omapi_protocol_connect (omapi_object_t *h, return status; } - /* Send the introductory message. */ - status = omapi_protocol_send_intro ((omapi_object_t *)obj, - OMAPI_PROTOCOL_VERSION, - sizeof (omapi_protocol_header_t)); - if (status != ISC_R_SUCCESS) { - omapi_object_dereference ((omapi_object_t **)&obj, MDL); - return status; - } - if (authinfo) omapi_object_reference (&obj -> authinfo, authinfo, MDL); omapi_object_dereference ((omapi_object_t **)&obj, MDL); @@ -253,6 +244,19 @@ isc_result_t omapi_protocol_signal_handler (omapi_object_t *h, } p = (omapi_protocol_object_t *)h; + if (!strcmp (name, "connect")) { + /* Send the introductory message. */ + status = omapi_protocol_send_intro + ((omapi_object_t *)obj, + OMAPI_PROTOCOL_VERSION, + sizeof (omapi_protocol_header_t)); + if (status != ISC_R_SUCCESS) { + omapi_disconnect (p -> outer, 1); + return status; + } + return ISC_R_SUCCESS; + } + /* Not a signal we recognize? */ if (strcmp (name, "ready")) { if (p -> inner && p -> inner -> type -> signal_handler) |