diff options
author | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-09-06 14:25:47 +0000 |
---|---|---|
committer | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-09-06 14:25:47 +0000 |
commit | 8c48c6835fbfada96d2197bcbc7a87023bfc8291 (patch) | |
tree | 2a60509a6637549f370b63ce3b27a3de8f9736d8 /epan/dissectors/packet-h245.c | |
parent | d6b920b8f6b22548e3828258ea11b2443af89ce4 (diff) |
Rename address_to_str() to ep_address_to_str() because:
1) This indicates that the string has ephemeral lifetime
2) More consistent with its existing seasonal counterpart, se_address_to_str().
svn path=/trunk/; revision=29747
Diffstat (limited to 'epan/dissectors/packet-h245.c')
-rw-r--r-- | epan/dissectors/packet-h245.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/epan/dissectors/packet-h245.c b/epan/dissectors/packet-h245.c index 6700f1ae9e..cbc6641411 100644 --- a/epan/dissectors/packet-h245.c +++ b/epan/dissectors/packet-h245.c @@ -427,7 +427,7 @@ static void h223_lc_init( void ) h223_fw_lc_num = 0; } -static void h245_init(void) +static void h245_init(void) { if ( h245_pending_olc_reqs) g_hash_table_destroy(h245_pending_olc_reqs); @@ -443,7 +443,7 @@ void h245_set_h223_add_lc_handle( h223_add_lc_handle_t handle ) static const gchar *gen_olc_key(guint16 lc_num, address *dst_addr, address *src_addr) { - return ep_strdup_printf("%s/%s/%u", address_to_str(dst_addr), address_to_str(src_addr), lc_num); + return ep_strdup_printf("%s/%s/%u", ep_address_to_str(dst_addr), ep_address_to_str(src_addr), lc_num); } static void update_unicast_addr(unicast_addr_t *req_addr, unicast_addr_t *ack_addr) @@ -466,8 +466,8 @@ static void h245_setup_channels(packet_info *pinfo, channel_info_t *upcoming_cha /* T.38 */ if (!strcmp(upcoming_channel->data_type_str, "t38fax")) { if (upcoming_channel->media_addr.addr.type!=AT_NONE && upcoming_channel->media_addr.port!=0 && t38_handle) { - t38_add_address(pinfo, &upcoming_channel->media_addr.addr, - upcoming_channel->media_addr.port, 0, + t38_add_address(pinfo, &upcoming_channel->media_addr.addr, + upcoming_channel->media_addr.port, 0, "H245", pinfo->fd->num); } return; @@ -488,13 +488,13 @@ static void h245_setup_channels(packet_info *pinfo, channel_info_t *upcoming_cha /* DEBUG g_warning("h245_setup_channels media_addr.addr.type %u port %u",upcoming_channel->media_addr.addr.type, upcoming_channel->media_addr.port ); */ if (upcoming_channel->media_addr.addr.type!=AT_NONE && upcoming_channel->media_addr.port!=0 && rtp_handle) { - srtp_add_address(pinfo, &upcoming_channel->media_addr.addr, - upcoming_channel->media_addr.port, 0, + srtp_add_address(pinfo, &upcoming_channel->media_addr.addr, + upcoming_channel->media_addr.port, 0, "H245", pinfo->fd->num, upcoming_channel->is_video , rtp_dyn_payload, dummy_srtp_info); } if (upcoming_channel->media_control_addr.addr.type!=AT_NONE && upcoming_channel->media_control_addr.port!=0 && rtcp_handle) { - srtcp_add_address(pinfo, &upcoming_channel->media_control_addr.addr, - upcoming_channel->media_control_addr.port, 0, + srtcp_add_address(pinfo, &upcoming_channel->media_control_addr.addr, + upcoming_channel->media_control_addr.port, 0, "H245", pinfo->fd->num, dummy_srtp_info); } } @@ -4067,7 +4067,7 @@ dissect_h245_Application(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_ &value); codec_type = val_to_str(value, h245_Application_vals, "<unknown>"); - if (h245_pi != NULL) + if (h245_pi != NULL) g_snprintf(h245_pi->frame_label, 50, "%s %s", h245_pi->frame_label, codec_type); @@ -5726,7 +5726,7 @@ dissect_h245_VideoCapability(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx &value); codec_type = val_to_str(value, h245_VideoCapability_vals, "<unknown>"); - if (h245_pi != NULL) + if (h245_pi != NULL) g_snprintf(h245_pi->frame_label, 50, "%s %s", h245_pi->frame_label, codec_type); @@ -6623,7 +6623,7 @@ dissect_h245_T_subMessageIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_ #line 630 "h245.cnf" guint32 subMessageIdentifer; gef_ctx_t *gefx; - + offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 127U, &subMessageIdentifer, FALSE); @@ -8454,7 +8454,7 @@ dissect_h245_OLC_reverseLogicalChannelParameters(tvbuff_t *tvb _U_, int offset _ offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_h245_OLC_reverseLogicalChannelParameters, OLC_reverseLogicalChannelParameters_sequence); - + if (upcoming_channel && codec_type) { g_strlcpy(upcoming_channel->data_type_str, codec_type, sizeof(upcoming_channel->data_type_str)); } @@ -8685,8 +8685,8 @@ dissect_h245_OpenLogicalChannel(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *a if (fast_start) { h245_setup_channels(actx->pinfo, &upcoming_olc->rev_lc); } else { - g_hash_table_insert(h245_pending_olc_reqs, - se_strdup(gen_olc_key(upcoming_olc->fwd_lc_num, &actx->pinfo->dst, &actx->pinfo->src)), + g_hash_table_insert(h245_pending_olc_reqs, + se_strdup(gen_olc_key(upcoming_olc->fwd_lc_num, &actx->pinfo->dst, &actx->pinfo->src)), upcoming_olc); } } @@ -9264,7 +9264,7 @@ dissect_h245_VideoMode(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, &value); codec_type = val_to_str(value, h245_VideoMode_vals, "<unknown>"); - if (h245_pi != NULL) + if (h245_pi != NULL) g_snprintf(h245_pi->frame_label, 50, "%s %s", h245_pi->frame_label, val_to_str(value, h245_VideoMode_vals, "ukn")); @@ -9592,7 +9592,7 @@ dissect_h245_AudioMode(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, &value); codec_type = val_to_str(value, h245_AudioMode_vals, "<unknown>"); - if (h245_pi != NULL) + if (h245_pi != NULL) g_snprintf(h245_pi->frame_label, 50, "%s %s", h245_pi->frame_label, val_to_str(value, h245_AudioMode_vals, "ukn")); @@ -9661,7 +9661,7 @@ dissect_h245_DataModeApplication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t * &value); codec_type = val_to_str(value, h245_DataModeApplication_vals, "<unknown>"); - if (h245_pi != NULL) + if (h245_pi != NULL) g_snprintf(h245_pi->frame_label, 50, "%s %s", h245_pi->frame_label, val_to_str(value, h245_DataModeApplication_vals, "ukn")); @@ -10996,7 +10996,7 @@ dissect_h245_T_forwardMultiplexAckParameters(tvbuff_t *tvb _U_, int offset _U_, ett_h245_T_forwardMultiplexAckParameters, T_forwardMultiplexAckParameters_choice, NULL); - + upcoming_channel = NULL; @@ -11027,14 +11027,14 @@ dissect_h245_OpenLogicalChannelAck(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t h223_fw_lc_num = 0; h223_rev_lc_num = 0; - + offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_h245_OpenLogicalChannelAck, OpenLogicalChannelAck_sequence); temp = h223_fw_lc_num; p2p_dir = actx->pinfo->p2p_dir; - + if(actx->pinfo->p2p_dir == P2P_DIR_SENT) actx->pinfo->p2p_dir = P2P_DIR_RECV; else @@ -14518,7 +14518,7 @@ dissect_h245_FastStart_OLC(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr dissect_OpenLogicalChannel_PDU(tvb, pinfo, tree); - if (h245_pi != NULL) + if (h245_pi != NULL) h245_pi->msg_type = H245_OpenLogChn; if (codec_str && codec_type){ @@ -20698,7 +20698,7 @@ void proto_register_h245(void) { oid_add_from_string("ISO/IEC 14496-2 MPEG-4 video","0.0.8.245.1.0.0"); /* This capability is defined in Annex H. */ oid_add_from_string("ISO/IEC 14496-3 MPEG-4 audio","0.0.8.245.1.1.0"); - /* This capability is defined in Annex I. */ + /* This capability is defined in Annex I. */ oid_add_from_string("AMR","0.0.8.245.1.1.1"); /* This capability is defined in Annex J. */ oid_add_from_string("acelp","0.0.8.245.1.1.2"); @@ -20720,7 +20720,7 @@ void proto_register_h245(void) { oid_add_from_string("AMR-WB","0.0.8.245.1.1.10"); /* This capability is defined in Annex S. */ oid_add_from_string("ilbc","0.0.8.245.1.1.11"); - + oid_add_from_string("ISO/IEC 14496-1","0.0.8.245.1.2.0"); oid_add_from_string("Nx64","0.0.8.245.1.2.1"); oid_add_from_string("logical-channel-bit-ratemanagement","0.0.8.245.1.3.0"); |