summaryrefslogtreecommitdiff
path: root/asn1/h245
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2013-03-17 17:52:26 +0000
committerAnders Broman <anders.broman@ericsson.com>2013-03-17 17:52:26 +0000
commit3e3847517636caa23cfa71981d79962e9e7c58a2 (patch)
treeb3f141b4c44c1239f4a0d3d48088b948f8955905 /asn1/h245
parent81e80f2c0b43144a020ded42a2c5b8e9b66c6b2a (diff)
downloadwireshark-3e3847517636caa23cfa71981d79962e9e7c58a2.tar.gz
From beroset:
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48356
Diffstat (limited to 'asn1/h245')
-rw-r--r--asn1/h245/h245.cnf28
-rw-r--r--asn1/h245/packet-h245-template.c8
2 files changed, 18 insertions, 18 deletions
diff --git a/asn1/h245/h245.cnf b/asn1/h245/h245.cnf
index 95b3e75a26..a9c5df2dbf 100644
--- a/asn1/h245/h245.cnf
+++ b/asn1/h245/h245.cnf
@@ -81,7 +81,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format
#----------------------------------------------------------------------------------------
#.FN_HDR MultiplexElement
/*MultiplexElement*/
- h223_mux_element* me = se_alloc(sizeof(h223_mux_element));
+ h223_mux_element* me = se_new(h223_mux_element);
h223_me->next = me;
h223_me = me;
h223_me->next = NULL;
@@ -129,7 +129,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format
#.FN_BODY OpenLogicalChannel
gint32 temp;
- upcoming_olc = (!actx->pinfo->fd->flags.visited) ? se_alloc0(sizeof(olc_info_t)) : NULL;
+ upcoming_olc = (!actx->pinfo->fd->flags.visited) ? se_new0(olc_info_t) : NULL;
h223_fw_lc_num = 0;
h223_lc_params_temp = NULL;
@@ -137,7 +137,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format
%(DEFAULT_BODY)s
if(h223_fw_lc_num != 0 && h223_fw_lc_params) {
- h223_pending_olc *pending = se_alloc(sizeof(h223_pending_olc));
+ h223_pending_olc *pending = se_new(h223_pending_olc);
pending->fw_channel_params = h223_fw_lc_params;
pending->rev_channel_params = h223_rev_lc_params;
temp = h223_fw_lc_num;
@@ -183,7 +183,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format
#.END
#----------------------------------------------------------------------------------------
#.FN_HDR OpenLogicalChannel/forwardLogicalChannelParameters/multiplexParameters/h223LogicalChannelParameters
- h223_fw_lc_params = se_alloc(sizeof(h223_lc_params));
+ h223_fw_lc_params = se_new(h223_lc_params);
h223_fw_lc_params->al_type = al_nonStandard;
h223_fw_lc_params->al_params = NULL;
h223_fw_lc_params->segmentable = 0;
@@ -204,7 +204,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format
#.END
#----------------------------------------------------------------------------------------
#.FN_HDR OpenLogicalChannel/reverseLogicalChannelParameters/multiplexParameters/h223LogicalChannelParameters
- h223_rev_lc_params = se_alloc(sizeof(h223_lc_params));
+ h223_rev_lc_params = se_new(h223_lc_params);
h223_rev_lc_params->al_type = al_nonStandard;
h223_rev_lc_params->al_params = NULL;
h223_rev_lc_params->segmentable = 0;
@@ -222,7 +222,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format
const gchar *olc_key;
olc_info_t *olc_req;
- upcoming_olc = (!actx->pinfo->fd->flags.visited) ? ep_alloc0(sizeof(olc_info_t)) : NULL;
+ upcoming_olc = (!actx->pinfo->fd->flags.visited) ? ep_new0(olc_info_t) : NULL;
h223_fw_lc_num = 0;
h223_rev_lc_num = 0;
@@ -236,7 +236,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format
%(ACTX)s->pinfo->p2p_dir = P2P_DIR_RECV;
else
%(ACTX)s->pinfo->p2p_dir = P2P_DIR_SENT;
- pend = g_hash_table_lookup( h223_pending_olc_reqs[%(ACTX)s->pinfo->p2p_dir], GINT_TO_POINTER(temp) );
+ pend = (h223_pending_olc *)g_hash_table_lookup( h223_pending_olc_reqs[%(ACTX)s->pinfo->p2p_dir], GINT_TO_POINTER(temp) );
if (pend) {
DISSECTOR_ASSERT( ( h223_rev_lc_num && pend->rev_channel_params)
|| (!h223_rev_lc_num && !pend->rev_channel_params) );
@@ -252,7 +252,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format
if (upcoming_olc) {
olc_key = gen_olc_key(upcoming_olc->fwd_lc_num, &%(ACTX)s->pinfo->src, &%(ACTX)s->pinfo->dst);
- olc_req = g_hash_table_lookup(h245_pending_olc_reqs, olc_key);
+ olc_req = (olc_info_t *)g_hash_table_lookup(h245_pending_olc_reqs, olc_key);
if (olc_req) {
update_unicast_addr(&olc_req->fwd_lc.media_addr, &upcoming_olc->fwd_lc.media_addr);
update_unicast_addr(&olc_req->fwd_lc.media_control_addr, &upcoming_olc->fwd_lc.media_control_addr);
@@ -314,7 +314,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format
#.FN_HDR H223LogicalChannelParameters/adaptationLayerType/al3
if(h223_lc_params_temp) {
h223_lc_params_temp->al_type = al3;
- h223_lc_params_temp->al_params = se_alloc(sizeof(h223_al3_params));
+ h223_lc_params_temp->al_params = se_new(h223_al3_params);
}
#.END
#----------------------------------------------------------------------------------------
@@ -775,7 +775,7 @@ if (h245_pi != NULL)
%(DEFAULT_BODY)s
gefx = gef_ctx_get(actx->private_data);
if (gefx) {
- buf = ep_alloc(sizeof(guint8));
+ buf = ep_new(guint8);
buf[0] = value;
value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(guint8), sizeof(guint8));
/* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %%s", gefx->key);*/
@@ -792,7 +792,7 @@ if (h245_pi != NULL)
%(DEFAULT_BODY)s
gefx = gef_ctx_get(actx->private_data);
if (gefx) {
- buf = ep_alloc(sizeof(guint16));
+ buf = (guint8 *)ep_new(guint16);
phtons(buf, value);
value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(guint16), sizeof(guint16));
/* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %%s", gefx->key);*/
@@ -809,7 +809,7 @@ if (h245_pi != NULL)
%(DEFAULT_BODY)s
gefx = gef_ctx_get(actx->private_data);
if (gefx) {
- buf = ep_alloc(sizeof(guint16));
+ buf = (guint8 *)ep_new(guint16);
phtons(buf, value);
value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(guint16), sizeof(guint16));
/* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %%s", gefx->key);*/
@@ -826,7 +826,7 @@ if (h245_pi != NULL)
%(DEFAULT_BODY)s
gefx = gef_ctx_get(actx->private_data);
if (gefx) {
- buf = ep_alloc(sizeof(guint32));
+ buf = (guint8 *)ep_new(guint32);
phtonl(buf, value);
value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(guint32), sizeof(guint32));
/* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %%s", gefx->key);*/
@@ -843,7 +843,7 @@ if (h245_pi != NULL)
%(DEFAULT_BODY)s
gefx = gef_ctx_get(actx->private_data);
if (gefx) {
- buf = ep_alloc(sizeof(guint32));
+ buf = (guint8 *)ep_new(guint32);
phtonl(buf, value);
value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(guint32), sizeof(guint32));
/* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %%s", gefx->key);*/
diff --git a/asn1/h245/packet-h245-template.c b/asn1/h245/packet-h245-template.c
index b9ab74fe63..2403ff99e3 100644
--- a/asn1/h245/packet-h245-template.c
+++ b/asn1/h245/packet-h245-template.c
@@ -354,17 +354,17 @@ static void h245_setup_channels(packet_info *pinfo, channel_info_t *upcoming_cha
/* (S)RTP, (S)RTCP */
if (upcoming_channel_lcl->rfc2198 > 0) {
- encoding_name_and_rate_t *encoding_name_and_rate = se_alloc( sizeof(encoding_name_and_rate_t));
+ encoding_name_and_rate_t *encoding_name_and_rate = se_new(encoding_name_and_rate_t);
rtp_dyn_payload = g_hash_table_new(g_int_hash, g_int_equal);
encoding_name_and_rate->encoding_name = se_strdup("red");
encoding_name_and_rate->sample_rate = 8000;
- key = se_alloc(sizeof(gint));
+ key = se_new(gint);
*key = upcoming_channel_lcl->rfc2198;
g_hash_table_insert(rtp_dyn_payload, key, encoding_name_and_rate);
}
if (upcoming_channel_lcl->srtp_flag) {
- dummy_srtp_info = se_alloc0(sizeof(struct srtp_info));
+ dummy_srtp_info = se_new0(struct srtp_info);
}
/* DEBUG g_warning("h245_setup_channels media_addr.addr.type %u port %u",upcoming_channel_lcl->media_addr.addr.type, upcoming_channel_lcl->media_addr.port );
@@ -432,7 +432,7 @@ dissect_h245_h245(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
/* assume that whilst there is more tvb data, there are more h245 commands */
while ( tvb_length_remaining( tvb, offset>>3 )>0 ){
CLEANUP_PUSH(reset_h245_pi, NULL);
- h245_pi=ep_alloc(sizeof(h245_packet_info));
+ h245_pi=ep_new(h245_packet_info);
init_h245_packet_info(h245_pi);
asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
offset = dissect_h245_MultimediaSystemControlMessage(tvb, offset, &asn1_ctx, tr, hf_h245_pdu_type);