Latest "config.guess" and "config.sub" from
[obnox/wireshark/wip.git] / packet-ldap.c
index 409c12eaf6b96fcb926af54206aacb6d920423d4..60a9e20434019f18e0cad95a0bbeffb4eb91db74 100644 (file)
@@ -1,10 +1,10 @@
 /* packet-ldap.c
  * Routines for ldap packet dissection
  *
- * $Id: packet-ldap.c,v 1.27 2001/06/18 02:17:48 guy Exp $
+ * $Id: packet-ldap.c,v 1.29 2001/12/03 03:59:36 guy Exp $
  *
  * Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
  * Copyright 1998 Gerald Combs
  *
  * This program is free software; you can redistribute it and/or
@@ -781,7 +781,7 @@ static int dissect_ldap_request_modifyrdn(ASN1_SCK *a, proto_tree *tree,
   read_string(a, tree, hf_ldap_message_modrdn_name, 0, 0, ASN1_UNI, ASN1_OTS);
   read_boolean(a, tree, hf_ldap_message_modrdn_delete, 0, 0);
   
-  if (a->offset < (start + length)) {
+  if (a->offset < (int) (start + length)) {
     /* LDAP V3 Modify DN operation, with newSuperior */
     read_string(a, tree, hf_ldap_message_modrdn_superior, 0, 0, ASN1_UNI, ASN1_OTS);
   }
@@ -1217,5 +1217,8 @@ proto_register_ldap(void)
 void
 proto_reg_handoff_ldap(void)
 {
-  dissector_add("tcp.port", TCP_PORT_LDAP, dissect_ldap, proto_ldap);
+  dissector_handle_t ldap_handle;
+
+  ldap_handle = create_dissector_handle(dissect_ldap, proto_ldap);
+  dissector_add("tcp.port", TCP_PORT_LDAP, ldap_handle);
 }