forked from osmocom/wireshark
From beroset:
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachments #10423,#10424 svn path=/trunk/; revision=48450
This commit is contained in:
parent
48af69f95f
commit
1f083fd654
|
@ -2280,7 +2280,7 @@ void proto_register_ldap(void) {
|
|||
sizeof(attribute_type_t),
|
||||
"custom_ldap_attribute_types",
|
||||
TRUE,
|
||||
(void*) &attribute_types,
|
||||
(void**) &attribute_types,
|
||||
&num_attribute_types,
|
||||
/* specifies named fields, so affects dissection
|
||||
and the set of named fields */
|
||||
|
|
|
@ -91,7 +91,7 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound")
|
|||
static const asn1_par_def_t ProtocolIE_ContainerList_pars[] = {
|
||||
{ "lowerBound", ASN1_PAR_INTEGER },
|
||||
{ "upperBound", ASN1_PAR_INTEGER },
|
||||
{ NULL, 0 }
|
||||
{ NULL, (asn1_par_type)0 }
|
||||
};
|
||||
asn1_stack_frame_check(actx, "ProtocolIE-ContainerList", ProtocolIE_ContainerList_pars);
|
||||
#.END
|
||||
|
|
|
@ -5886,7 +5886,7 @@ void proto_register_ldap(void) {
|
|||
sizeof(attribute_type_t),
|
||||
"custom_ldap_attribute_types",
|
||||
TRUE,
|
||||
(void*) &attribute_types,
|
||||
(void**) &attribute_types,
|
||||
&num_attribute_types,
|
||||
/* specifies named fields, so affects dissection
|
||||
and the set of named fields */
|
||||
|
|
|
@ -506,7 +506,7 @@ dissect_m3ap_ProtocolIE_ContainerList(tvbuff_t *tvb _U_, int offset _U_, asn1_ct
|
|||
static const asn1_par_def_t ProtocolIE_ContainerList_pars[] = {
|
||||
{ "lowerBound", ASN1_PAR_INTEGER },
|
||||
{ "upperBound", ASN1_PAR_INTEGER },
|
||||
{ NULL, 0 }
|
||||
{ NULL, (asn1_par_type)0 }
|
||||
};
|
||||
asn1_stack_frame_check(actx, "ProtocolIE-ContainerList", ProtocolIE_ContainerList_pars);
|
||||
|
||||
|
|
|
@ -122,8 +122,8 @@ geoip_dat_scan_dir(const char *dirname) {
|
|||
|
||||
/* UAT callbacks */
|
||||
static void* geoip_db_path_copy_cb(void* dest, const void* orig, size_t len _U_) {
|
||||
const geoip_db_path_t *m = orig;
|
||||
geoip_db_path_t *d = dest;
|
||||
const geoip_db_path_t *m = (geoip_db_path_t *)orig;
|
||||
geoip_db_path_t *d = (geoip_db_path_t *)dest;
|
||||
|
||||
d->path = g_strdup(m->path);
|
||||
|
||||
|
@ -131,7 +131,7 @@ static void* geoip_db_path_copy_cb(void* dest, const void* orig, size_t len _U_)
|
|||
}
|
||||
|
||||
static void geoip_db_path_free_cb(void* p) {
|
||||
geoip_db_path_t *m = p;
|
||||
geoip_db_path_t *m = (geoip_db_path_t *)p;
|
||||
g_free(m->path);
|
||||
}
|
||||
|
||||
|
@ -181,12 +181,12 @@ static void geoip_db_post_update_cb(void) {
|
|||
* (using "City" in reality) */
|
||||
|
||||
/* latitude */
|
||||
gi = g_malloc(sizeof (GeoIP));
|
||||
gi = (GeoIP *)g_malloc(sizeof (GeoIP));
|
||||
gi->databaseType = WS_LAT_FAKE_EDITION;
|
||||
g_array_append_val(geoip_dat_arr, gi);
|
||||
|
||||
/* longitude */
|
||||
gi = g_malloc(sizeof (GeoIP));
|
||||
gi = (GeoIP *)g_malloc(sizeof (GeoIP));
|
||||
gi->databaseType = WS_LON_FAKE_EDITION;
|
||||
g_array_append_val(geoip_dat_arr, gi);
|
||||
}
|
||||
|
@ -206,7 +206,7 @@ geoip_db_pref_init(module_t *nameres)
|
|||
sizeof(geoip_db_path_t),
|
||||
"geoip_db_paths",
|
||||
FALSE,
|
||||
(void*)&geoip_db_paths,
|
||||
(void**)&geoip_db_paths,
|
||||
&num_geoip_db_paths,
|
||||
/* affects dissection of packets (as the GeoIP database is
|
||||
used when dissecting), but not set of named fields */
|
||||
|
@ -244,10 +244,10 @@ geoip_db_init(void) {
|
|||
GeoIP *gi_lat;
|
||||
GeoIP *gi_lon;
|
||||
|
||||
gi_lat = g_malloc(sizeof (GeoIP));
|
||||
gi_lat = (GeoIP *)g_malloc(sizeof (GeoIP));
|
||||
gi_lat->databaseType = WS_LAT_FAKE_EDITION;
|
||||
g_array_append_val(geoip_dat_arr, gi_lat);
|
||||
gi_lon = g_malloc(sizeof (GeoIP));
|
||||
gi_lon = (GeoIP *)g_malloc(sizeof (GeoIP));
|
||||
gi_lon->databaseType = WS_LON_FAKE_EDITION;
|
||||
g_array_append_val(geoip_dat_arr, gi_lon);
|
||||
}
|
||||
|
|
|
@ -531,7 +531,7 @@ static gboolean destroy_value_strings(gpointer k, gpointer v, gpointer p _U_) {
|
|||
g_free((void*)vs->strptr);
|
||||
}
|
||||
|
||||
g_array_free(v,TRUE);
|
||||
g_array_free((GArray*)v,TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ gchar* scs_subscribe(SCS_collection* c, const gchar* s) {
|
|||
guint* ip = NULL;
|
||||
size_t len = 0;
|
||||
|
||||
g_hash_table_lookup_extended(c->hash,(gconstpointer)s,(gpointer)&orig,(gpointer *)&ip);
|
||||
g_hash_table_lookup_extended(c->hash,(gconstpointer)s,(gpointer *)&orig,(gpointer *)&ip);
|
||||
|
||||
if (ip) {
|
||||
(*ip)++;
|
||||
|
@ -309,11 +309,11 @@ extern void avp_init(void) {
|
|||
*
|
||||
**/
|
||||
extern AVP* new_avp_from_finfo(const gchar* name, field_info* finfo) {
|
||||
AVP* new_avp = (AVP*)g_slice_new(any_avp_type);
|
||||
AVP* new_avp_val = (AVP*)g_slice_new(any_avp_type);
|
||||
gchar* value;
|
||||
gchar* repr = NULL;
|
||||
|
||||
new_avp->n = scs_subscribe(avp_strings, name);
|
||||
new_avp_val->n = scs_subscribe(avp_strings, name);
|
||||
|
||||
if (finfo->value.ftype->val_to_string_repr) {
|
||||
repr = fvalue_to_string_repr(&finfo->value,FTREPR_DISPLAY,NULL);
|
||||
|
@ -331,15 +331,15 @@ extern AVP* new_avp_from_finfo(const gchar* name, field_info* finfo) {
|
|||
value = scs_subscribe(avp_strings, "");
|
||||
}
|
||||
|
||||
new_avp->v = value;
|
||||
new_avp_val->v = value;
|
||||
|
||||
new_avp->o = '=';
|
||||
new_avp_val->o = '=';
|
||||
|
||||
#ifdef _AVP_DEBUGGING
|
||||
dbg_print (dbg_avp,1,dbg_fp,"new_avp_from_finfo: %X %s%c%s;",(guint32) new_avp,new_avp->n,new_avp->o,new_avp->v);
|
||||
dbg_print (dbg_avp,1,dbg_fp,"new_avp_from_finfo: %X %s%c%s;",(guint32) new_avp_val,new_avp_val->n,new_avp_val->o,new_avp_val->v);
|
||||
#endif
|
||||
|
||||
return new_avp;
|
||||
return new_avp_val;
|
||||
}
|
||||
|
||||
|
||||
|
@ -355,16 +355,16 @@ extern AVP* new_avp_from_finfo(const gchar* name, field_info* finfo) {
|
|||
*
|
||||
**/
|
||||
extern AVP* new_avp(const gchar* name, const gchar* value, gchar o) {
|
||||
AVP* new_avp = (AVP*)g_slice_new(any_avp_type);
|
||||
AVP* new_avp_val = (AVP*)g_slice_new(any_avp_type);
|
||||
|
||||
new_avp->n = scs_subscribe(avp_strings, name);
|
||||
new_avp->v = scs_subscribe(avp_strings, value);
|
||||
new_avp->o = o;
|
||||
new_avp_val->n = scs_subscribe(avp_strings, name);
|
||||
new_avp_val->v = scs_subscribe(avp_strings, value);
|
||||
new_avp_val->o = o;
|
||||
|
||||
#ifdef _AVP_DEBUGGING
|
||||
dbg_print(dbg_avp,1,dbg_fp,"new_avp: %X %s%c%s;",(guint32) new_avp,new_avp->n,new_avp->o,new_avp->v);
|
||||
dbg_print(dbg_avp,1,dbg_fp,"new_avp_val: %X %s%c%s;",(guint32) new_avp_val,new_avp_val->n,new_avp_val->o,new_avp_val->v);
|
||||
#endif
|
||||
return new_avp;
|
||||
return new_avp_val;
|
||||
}
|
||||
|
||||
|
||||
|
@ -396,17 +396,17 @@ extern void delete_avp(AVP* avp) {
|
|||
*
|
||||
**/
|
||||
extern AVP* avp_copy(AVP* from) {
|
||||
AVP* new_avp = (AVP*)g_slice_new(any_avp_type);
|
||||
AVP* new_avp_val = (AVP*)g_slice_new(any_avp_type);
|
||||
|
||||
new_avp->n = scs_subscribe(avp_strings, from->n);
|
||||
new_avp->v = scs_subscribe(avp_strings, from->v);
|
||||
new_avp->o = from->o;
|
||||
new_avp_val->n = scs_subscribe(avp_strings, from->n);
|
||||
new_avp_val->v = scs_subscribe(avp_strings, from->v);
|
||||
new_avp_val->o = from->o;
|
||||
|
||||
#ifdef _AVP_DEBUGGING
|
||||
dbg_print(dbg_avp,1,dbg_fp,"copy_avp: %X %s%c%s;",(guint32) new_avp,new_avp->n,new_avp->o,new_avp->v);
|
||||
dbg_print(dbg_avp,1,dbg_fp,"copy_avp: %X %s%c%s;",(guint32) new_avp_val,new_avp_val->n,new_avp_val->o,new_avp_val->v);
|
||||
#endif
|
||||
|
||||
return new_avp;
|
||||
return new_avp_val;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -453,13 +453,13 @@ extern void rename_avpl(AVPL* avpl, gchar* name) {
|
|||
* it is not inserted.
|
||||
**/
|
||||
extern gboolean insert_avp(AVPL* avpl, AVP* avp) {
|
||||
AVPN* new_avp = (AVPN*)g_slice_new(any_avp_type);
|
||||
AVPN* new_avp_val = (AVPN*)g_slice_new(any_avp_type);
|
||||
AVPN* c;
|
||||
|
||||
new_avp->avp = avp;
|
||||
new_avp_val->avp = avp;
|
||||
|
||||
#ifdef _AVP_DEBUGGING
|
||||
dbg_print(dbg_avpl_op,7,dbg_fp,"new_avpn: %X",new_avp);
|
||||
dbg_print(dbg_avpl_op,7,dbg_fp,"new_avpn: %X",new_avp_val);
|
||||
dbg_print(dbg_avpl_op,4,dbg_fp,"insert_avp: %X %X %s%c%s;",avpl,avp,avp->n,avp->o,avp->v);
|
||||
#endif
|
||||
|
||||
|
@ -475,9 +475,9 @@ extern gboolean insert_avp(AVPL* avpl, AVP* avp) {
|
|||
if (avp->v == c->avp->v) {
|
||||
if (avp->o == AVP_OP_EQUAL) {
|
||||
#ifdef _AVP_DEBUGGING
|
||||
dbg_print(dbg_avpl_op,7,dbg_fp,"delete_avpn: %X",new_avp);
|
||||
dbg_print(dbg_avpl_op,7,dbg_fp,"delete_avpn: %X",new_avp_val);
|
||||
#endif
|
||||
g_slice_free(any_avp_type,(any_avp_type*)new_avp);
|
||||
g_slice_free(any_avp_type,(any_avp_type*)new_avp_val);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -492,10 +492,10 @@ extern gboolean insert_avp(AVPL* avpl, AVP* avp) {
|
|||
dbg_print(dbg_avpl,5,dbg_fp,"insert_avp: inserting %X in %X before %X;",avp,avpl,c);
|
||||
#endif
|
||||
|
||||
new_avp->next = c;
|
||||
new_avp->prev = c->prev;
|
||||
c->prev->next = new_avp;
|
||||
c->prev = new_avp;
|
||||
new_avp_val->next = c;
|
||||
new_avp_val->prev = c->prev;
|
||||
c->prev->next = new_avp_val;
|
||||
c->prev = new_avp_val;
|
||||
|
||||
avpl->len++;
|
||||
|
||||
|
|
Loading…
Reference in New Issue