Some additional UAT update callback changes.
I guess the signature mismatch must just be a warning with Clang; it's not with MSVC. Change-Id: Ic1f4cb88471f7e13019e891f111978310dfada73 Reviewed-on: https://code.wireshark.org/review/7225 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
b10bad126a
commit
909d891b26
|
@ -406,7 +406,7 @@ static guint num_attribute_types = 0;
|
|||
|
||||
static GHashTable* attribute_types_hash = NULL;
|
||||
|
||||
static void
|
||||
static gboolean
|
||||
attribute_types_update_cb(void *r, char **err)
|
||||
{
|
||||
attribute_type_t *rec = (attribute_type_t *)r;
|
||||
|
@ -414,13 +414,13 @@ attribute_types_update_cb(void *r, char **err)
|
|||
|
||||
if (rec->attribute_type == NULL) {
|
||||
*err = g_strdup("Attribute type can't be empty");
|
||||
return;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
g_strstrip(rec->attribute_type);
|
||||
if (rec->attribute_type[0] == 0) {
|
||||
*err = g_strdup("Attribute type can't be empty");
|
||||
return;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Check for invalid characters (to avoid asserting out when
|
||||
|
@ -429,10 +429,11 @@ attribute_types_update_cb(void *r, char **err)
|
|||
c = proto_check_field_name(rec->attribute_type);
|
||||
if (c) {
|
||||
*err = g_strdup_printf("Attribute type can't contain '%c'", c);
|
||||
return;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
*err = NULL;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void *
|
||||
|
|
|
@ -1368,7 +1368,7 @@ snmp_users_free_cb(void* p)
|
|||
g_free(ue->engine.data);
|
||||
}
|
||||
|
||||
static void
|
||||
static gboolean
|
||||
snmp_users_update_cb(void* p _U_, char** err)
|
||||
{
|
||||
snmp_ue_assoc_t* ue = (snmp_ue_assoc_t*)p;
|
||||
|
@ -1379,7 +1379,7 @@ snmp_users_update_cb(void* p _U_, char** err)
|
|||
|
||||
if (num_ueas == 0)
|
||||
/* Nothing to update */
|
||||
return;
|
||||
return FALSE;
|
||||
|
||||
if (! ue->user.userName.len)
|
||||
g_string_append_printf(es,"no userName\n");
|
||||
|
@ -1414,9 +1414,10 @@ snmp_users_update_cb(void* p _U_, char** err)
|
|||
if (es->len) {
|
||||
es = g_string_truncate(es,es->len-1);
|
||||
*err = g_string_free(es, FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -620,7 +620,7 @@ static guint num_attribute_types = 0;
|
|||
|
||||
static GHashTable* attribute_types_hash = NULL;
|
||||
|
||||
static void
|
||||
static gboolean
|
||||
attribute_types_update_cb(void *r, char **err)
|
||||
{
|
||||
attribute_type_t *rec = (attribute_type_t *)r;
|
||||
|
@ -628,13 +628,13 @@ attribute_types_update_cb(void *r, char **err)
|
|||
|
||||
if (rec->attribute_type == NULL) {
|
||||
*err = g_strdup("Attribute type can't be empty");
|
||||
return;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
g_strstrip(rec->attribute_type);
|
||||
if (rec->attribute_type[0] == 0) {
|
||||
*err = g_strdup("Attribute type can't be empty");
|
||||
return;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Check for invalid characters (to avoid asserting out when
|
||||
|
@ -643,10 +643,11 @@ attribute_types_update_cb(void *r, char **err)
|
|||
c = proto_check_field_name(rec->attribute_type);
|
||||
if (c) {
|
||||
*err = g_strdup_printf("Attribute type can't contain '%c'", c);
|
||||
return;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
*err = NULL;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void *
|
||||
|
@ -3806,7 +3807,7 @@ static int dissect_PasswordPolicyResponseValue_PDU(tvbuff_t *tvb _U_, packet_inf
|
|||
|
||||
|
||||
/*--- End of included file: packet-ldap-fn.c ---*/
|
||||
#line 882 "../../asn1/ldap/packet-ldap-template.c"
|
||||
#line 883 "../../asn1/ldap/packet-ldap-template.c"
|
||||
static int dissect_LDAPMessage_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ldap_conv_info_t *ldap_info) {
|
||||
|
||||
int offset = 0;
|
||||
|
@ -5699,7 +5700,7 @@ void proto_register_ldap(void) {
|
|||
NULL, HFILL }},
|
||||
|
||||
/*--- End of included file: packet-ldap-hfarr.c ---*/
|
||||
#line 2206 "../../asn1/ldap/packet-ldap-template.c"
|
||||
#line 2207 "../../asn1/ldap/packet-ldap-template.c"
|
||||
};
|
||||
|
||||
/* List of subtrees */
|
||||
|
@ -5773,7 +5774,7 @@ void proto_register_ldap(void) {
|
|||
&ett_ldap_T_warning,
|
||||
|
||||
/*--- End of included file: packet-ldap-ettarr.c ---*/
|
||||
#line 2220 "../../asn1/ldap/packet-ldap-template.c"
|
||||
#line 2221 "../../asn1/ldap/packet-ldap-template.c"
|
||||
};
|
||||
/* UAT for header fields */
|
||||
static uat_field_t custom_attribute_types_uat_fields[] = {
|
||||
|
@ -5939,7 +5940,7 @@ proto_reg_handoff_ldap(void)
|
|||
|
||||
|
||||
/*--- End of included file: packet-ldap-dis-tab.c ---*/
|
||||
#line 2369 "../../asn1/ldap/packet-ldap-template.c"
|
||||
#line 2370 "../../asn1/ldap/packet-ldap-template.c"
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1470,7 +1470,7 @@ snmp_users_free_cb(void* p)
|
|||
g_free(ue->engine.data);
|
||||
}
|
||||
|
||||
static void
|
||||
static gboolean
|
||||
snmp_users_update_cb(void* p _U_, char** err)
|
||||
{
|
||||
snmp_ue_assoc_t* ue = (snmp_ue_assoc_t*)p;
|
||||
|
@ -1481,7 +1481,7 @@ snmp_users_update_cb(void* p _U_, char** err)
|
|||
|
||||
if (num_ueas == 0)
|
||||
/* Nothing to update */
|
||||
return;
|
||||
return FALSE;
|
||||
|
||||
if (! ue->user.userName.len)
|
||||
g_string_append_printf(es,"no userName\n");
|
||||
|
@ -1516,9 +1516,10 @@ snmp_users_update_cb(void* p _U_, char** err)
|
|||
if (es->len) {
|
||||
es = g_string_truncate(es,es->len-1);
|
||||
*err = g_string_free(es, FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -3076,7 +3077,7 @@ static int dissect_SMUX_PDUs_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, prot
|
|||
|
||||
|
||||
/*--- End of included file: packet-snmp-fn.c ---*/
|
||||
#line 1864 "../../asn1/snmp/packet-snmp-template.c"
|
||||
#line 1865 "../../asn1/snmp/packet-snmp-template.c"
|
||||
|
||||
|
||||
guint
|
||||
|
@ -3898,7 +3899,7 @@ void proto_register_snmp(void) {
|
|||
NULL, HFILL }},
|
||||
|
||||
/*--- End of included file: packet-snmp-hfarr.c ---*/
|
||||
#line 2421 "../../asn1/snmp/packet-snmp-template.c"
|
||||
#line 2422 "../../asn1/snmp/packet-snmp-template.c"
|
||||
};
|
||||
|
||||
/* List of subtrees */
|
||||
|
@ -3938,7 +3939,7 @@ void proto_register_snmp(void) {
|
|||
&ett_snmp_RReqPDU_U,
|
||||
|
||||
/*--- End of included file: packet-snmp-ettarr.c ---*/
|
||||
#line 2437 "../../asn1/snmp/packet-snmp-template.c"
|
||||
#line 2438 "../../asn1/snmp/packet-snmp-template.c"
|
||||
};
|
||||
static ei_register_info ei[] = {
|
||||
{ &ei_snmp_failed_decrypted_data_pdu, { "snmp.failed_decrypted_data_pdu", PI_MALFORMED, PI_WARN, "Failed to decrypt encryptedPDU", EXPFILL }},
|
||||
|
|
Loading…
Reference in New Issue