Bug 1097142: Remove sdp_copy_attr_fields and some other unused functions. r=mt
authorByron Campen [:bwc] <docfaraday@gmail.com>
Tue, 17 Mar 2015 15:48:29 -0700
changeset 234366 9c8be30657caec774a0406549e19cd0d4e24f94d
parent 234365 d6242b24bc47eeee9b140a89fd9747958bce6a7f
child 234367 35515400af363bfc141353acd474814567c43c54
push id57102
push userbcampen@mozilla.com
push dateWed, 18 Mar 2015 23:21:11 +0000
treeherdermozilla-inbound@35515400af36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmt
bugs1097142
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1097142: Remove sdp_copy_attr_fields and some other unused functions. r=mt
media/webrtc/signaling/src/sdp/sipcc/sdp.h
media/webrtc/signaling/src/sdp/sipcc/sdp_attr_access.c
--- a/media/webrtc/signaling/src/sdp/sipcc/sdp.h
+++ b/media/webrtc/signaling/src/sdp/sipcc/sdp.h
@@ -1267,31 +1267,18 @@ extern sdp_result_e sdp_add_media_profil
 
 /* sdp_attr_access.c */
 extern sdp_attr_t *sdp_find_attr (sdp_t *sdp_p, uint16_t level, uint8_t cap_num,
                                   sdp_attr_e attr_type, uint16_t inst_num);
 
 extern int sdp_find_fmtp_inst(sdp_t *sdp_ptr, uint16_t level, uint16_t payload_num);
 extern sdp_result_e sdp_add_new_attr(sdp_t *sdp_p, uint16_t level, uint8_t cap_num,
                                      sdp_attr_e attr_type, uint16_t *inst_num);
-extern sdp_result_e sdp_copy_attr (sdp_t *src_sdp_ptr, sdp_t *dst_sdp_ptr,
-                                   uint16_t src_level, uint16_t dst_level,
-                                   uint8_t src_cap_num, uint8_t dst_cap_num,
-                                   sdp_attr_e src_attr_type, uint16_t src_inst_num);
-extern sdp_result_e sdp_copy_all_attrs(sdp_t *src_sdp_ptr, sdp_t *dst_sdp_ptr,
-                                       uint16_t src_level, uint16_t dst_level);
 extern sdp_result_e sdp_attr_num_instances(sdp_t *sdp_p, uint16_t level,
                          uint8_t cap_num, sdp_attr_e attr_type, uint16_t *num_attr_inst);
-extern sdp_result_e sdp_get_total_attrs(sdp_t *sdp_p, uint16_t level, uint8_t cap_num,
-                                        uint16_t *num_attrs);
-extern sdp_result_e sdp_get_attr_type(sdp_t *sdp_p, uint16_t level, uint8_t cap_num,
-                          uint16_t attr_num, sdp_attr_e *attr_type, uint16_t *inst_num);
-extern sdp_result_e sdp_delete_attr(sdp_t *sdp_p, uint16_t level, uint8_t cap_num,
-                             sdp_attr_e attr_type, uint16_t inst_num);
-extern sdp_result_e sdp_delete_all_attrs(sdp_t *sdp_p, uint16_t level, uint8_t cap_num);
 extern tinybool sdp_attr_valid(sdp_t *sdp_p, sdp_attr_e attr_type,
                                 uint16_t level, uint8_t cap_num, uint16_t inst_num);
 extern uint32_t sdp_attr_line_number(sdp_t *sdp_p, sdp_attr_e attr_type,
                                 uint16_t level, uint8_t cap_num, uint16_t inst_num);
 extern const char *sdp_attr_get_simple_string(sdp_t *sdp_p,
                    sdp_attr_e attr_type, uint16_t level, uint8_t cap_num, uint16_t inst_num);
 extern sdp_result_e sdp_attr_set_simple_string(sdp_t *sdp_p,
                    sdp_attr_e attr_type, uint16_t level,
--- a/media/webrtc/signaling/src/sdp/sipcc/sdp_attr_access.c
+++ b/media/webrtc/signaling/src/sdp/sipcc/sdp_attr_access.c
@@ -314,692 +314,16 @@ sdp_result_e sdp_add_new_attr (sdp_t *sd
         }
     }
 
     /* Increment the instance num for the attr just added. */
     (*inst_num)++;
     return (SDP_SUCCESS);
 }
 
-/* Function:    sdp_copy_attr_fields
- * Description: Copy the fields of an attribute based on attr type.
- *              This is an INTERNAL SDP routine only.  It will not copy
- *              X-Cap, X-Cpar, CDSC, or CPAR attrs.
- * Parameters:  src_attr_p  Ptr to the source attribute.
- *              dst_attr_p  Ptr to the dst attribute.
- * Returns:     Nothing.
- */
-void sdp_copy_attr_fields (sdp_attr_t *src_attr_p, sdp_attr_t *dst_attr_p)
-{
-    uint16_t i;
-
-    /* Copy over all the attribute information. */
-    dst_attr_p->type = src_attr_p->type;
-    dst_attr_p->next_p = NULL;
-
-    switch (src_attr_p->type) {
-
-    case SDP_ATTR_BEARER:
-    case SDP_ATTR_CALLED:
-    case SDP_ATTR_CONN_TYPE:
-    case SDP_ATTR_DIALED:
-    case SDP_ATTR_DIALING:
-    case SDP_ATTR_FRAMING:
-    case SDP_ATTR_MAXPRATE:
-    case SDP_ATTR_LABEL:
-    case SDP_ATTR_MID:
-        sstrncpy(dst_attr_p->attr.string_val, src_attr_p->attr.string_val,
-                 SDP_MAX_STRING_LEN+1);
-        break;
-
-    case SDP_ATTR_EECID:
-    case SDP_ATTR_PTIME:
-    case SDP_ATTR_T38_VERSION:
-    case SDP_ATTR_T38_MAXBITRATE:
-    case SDP_ATTR_T38_MAXBUFFER:
-    case SDP_ATTR_T38_MAXDGRAM:
-    case SDP_ATTR_X_SQN:
-    case SDP_ATTR_TC1_PAYLOAD_BYTES:
-    case SDP_ATTR_TC1_WINDOW_SIZE:
-    case SDP_ATTR_TC2_PAYLOAD_BYTES:
-    case SDP_ATTR_TC2_WINDOW_SIZE:
-    case SDP_ATTR_RTCP:
-    case SDP_ATTR_RTCP_UNICAST:
-        dst_attr_p->attr.u32_val = src_attr_p->attr.u32_val;
-        break;
-
-    case SDP_ATTR_T38_FILLBITREMOVAL:
-    case SDP_ATTR_T38_TRANSCODINGMMR:
-    case SDP_ATTR_T38_TRANSCODINGJBIG:
-    case SDP_ATTR_TMRGWXID:
-        dst_attr_p->attr.boolean_val = src_attr_p->attr.boolean_val;
-        break;
-
-    case SDP_ATTR_QOS:
-    case SDP_ATTR_SECURE:
-    case SDP_ATTR_X_PC_QOS:
-    case SDP_ATTR_X_QOS:
-        dst_attr_p->attr.qos.strength  = src_attr_p->attr.qos.strength;
-        dst_attr_p->attr.qos.direction = src_attr_p->attr.qos.direction;
-        dst_attr_p->attr.qos.confirm   = src_attr_p->attr.qos.confirm;
-        break;
-
-    case SDP_ATTR_CURR:
-        dst_attr_p->attr.curr.type         = src_attr_p->attr.curr.type;
-        dst_attr_p->attr.curr.direction    = src_attr_p->attr.curr.direction;
-        dst_attr_p->attr.curr.status_type  = src_attr_p->attr.curr.status_type;
-        break;
-    case SDP_ATTR_DES:
-        dst_attr_p->attr.des.type         = src_attr_p->attr.des.type;
-        dst_attr_p->attr.des.direction    = src_attr_p->attr.des.direction;
-        dst_attr_p->attr.des.status_type  = src_attr_p->attr.des.status_type;
-        dst_attr_p->attr.des.strength     = src_attr_p->attr.des.strength;
-        break;
-
-
-    case SDP_ATTR_CONF:
-        dst_attr_p->attr.conf.type         = src_attr_p->attr.conf.type;
-        dst_attr_p->attr.conf.direction    = src_attr_p->attr.conf.direction;
-        dst_attr_p->attr.conf.status_type  = src_attr_p->attr.conf.status_type;
-        break;
-
-    case SDP_ATTR_INACTIVE:
-    case SDP_ATTR_RECVONLY:
-    case SDP_ATTR_SENDONLY:
-    case SDP_ATTR_SENDRECV:
-        /* These attrs have no parameters. */
-        break;
-
-    case SDP_ATTR_FMTP:
-        dst_attr_p->attr.fmtp.payload_num = src_attr_p->attr.fmtp.payload_num;
-        dst_attr_p->attr.fmtp.maxval      = src_attr_p->attr.fmtp.maxval;
-        dst_attr_p->attr.fmtp.bitrate     = src_attr_p->attr.fmtp.bitrate;
-        dst_attr_p->attr.fmtp.annexa      = src_attr_p->attr.fmtp.annexa;
-        dst_attr_p->attr.fmtp.annexb      = src_attr_p->attr.fmtp.annexb;
-        dst_attr_p->attr.fmtp.qcif      = src_attr_p->attr.fmtp.qcif;
-        dst_attr_p->attr.fmtp.cif      = src_attr_p->attr.fmtp.cif;
-        dst_attr_p->attr.fmtp.sqcif      = src_attr_p->attr.fmtp.sqcif;
-        dst_attr_p->attr.fmtp.cif4      = src_attr_p->attr.fmtp.cif4;
-        dst_attr_p->attr.fmtp.cif16      = src_attr_p->attr.fmtp.cif16;
-        dst_attr_p->attr.fmtp.maxbr      = src_attr_p->attr.fmtp.maxbr;
-        dst_attr_p->attr.fmtp.custom_x   = src_attr_p->attr.fmtp.custom_x;
-        dst_attr_p->attr.fmtp.custom_y      = src_attr_p->attr.fmtp.custom_y;
-        dst_attr_p->attr.fmtp.custom_mpi      = src_attr_p->attr.fmtp.custom_mpi;
-        dst_attr_p->attr.fmtp.par_width      = src_attr_p->attr.fmtp.par_width;
-        dst_attr_p->attr.fmtp.par_height    = src_attr_p->attr.fmtp.par_height;
-        dst_attr_p->attr.fmtp.cpcf      = src_attr_p->attr.fmtp.cpcf;
-        dst_attr_p->attr.fmtp.bpp      = src_attr_p->attr.fmtp.bpp;
-        dst_attr_p->attr.fmtp.hrd      = src_attr_p->attr.fmtp.hrd;
-
-        dst_attr_p->attr.fmtp.profile      = src_attr_p->attr.fmtp.profile;
-        dst_attr_p->attr.fmtp.level      = src_attr_p->attr.fmtp.level;
-        dst_attr_p->attr.fmtp.is_interlace = src_attr_p->attr.fmtp.is_interlace;
-
-        sstrncpy(dst_attr_p->attr.fmtp.profile_level_id,
-                 src_attr_p->attr.fmtp.profile_level_id,
-                 SDP_MAX_STRING_LEN+1);
-        sstrncpy(dst_attr_p->attr.fmtp.parameter_sets,
-                 src_attr_p->attr.fmtp.parameter_sets,
-                 SDP_MAX_STRING_LEN+1);
-        dst_attr_p->attr.fmtp.deint_buf_req =
-                 src_attr_p->attr.fmtp.deint_buf_req;
-        dst_attr_p->attr.fmtp.max_don_diff =
-            src_attr_p->attr.fmtp.max_don_diff;
-        dst_attr_p->attr.fmtp.init_buf_time =
-                 src_attr_p->attr.fmtp.init_buf_time;
-        dst_attr_p->attr.fmtp.packetization_mode =
-                 src_attr_p->attr.fmtp.packetization_mode;
-        dst_attr_p->attr.fmtp.flag =
-                 src_attr_p->attr.fmtp.flag;
-
-        dst_attr_p->attr.fmtp.max_mbps = src_attr_p->attr.fmtp.max_mbps;
-        dst_attr_p->attr.fmtp.max_fs = src_attr_p->attr.fmtp.max_fs;
-        dst_attr_p->attr.fmtp.max_fr = src_attr_p->attr.fmtp.max_fr;
-        dst_attr_p->attr.fmtp.max_cpb = src_attr_p->attr.fmtp.max_cpb;
-        dst_attr_p->attr.fmtp.max_dpb = src_attr_p->attr.fmtp.max_dpb;
-        dst_attr_p->attr.fmtp.max_br = src_attr_p->attr.fmtp.max_br;
-        dst_attr_p->attr.fmtp.redundant_pic_cap =
-            src_attr_p->attr.fmtp.redundant_pic_cap;
-        dst_attr_p->attr.fmtp.deint_buf_cap =
-                 src_attr_p->attr.fmtp.deint_buf_cap;
-        dst_attr_p->attr.fmtp.max_rcmd_nalu_size =
-                 src_attr_p->attr.fmtp.max_rcmd_nalu_size;
-        dst_attr_p->attr.fmtp.interleaving_depth =
-                 src_attr_p->attr.fmtp.interleaving_depth;
-        dst_attr_p->attr.fmtp.parameter_add =
-            src_attr_p->attr.fmtp.parameter_add;
-
-        dst_attr_p->attr.fmtp.annex_d = src_attr_p->attr.fmtp.annex_d;
-        dst_attr_p->attr.fmtp.annex_f = src_attr_p->attr.fmtp.annex_f;
-        dst_attr_p->attr.fmtp.annex_i = src_attr_p->attr.fmtp.annex_i;
-        dst_attr_p->attr.fmtp.annex_j = src_attr_p->attr.fmtp.annex_j;
-        dst_attr_p->attr.fmtp.annex_t = src_attr_p->attr.fmtp.annex_t;
-        dst_attr_p->attr.fmtp.annex_k_val = src_attr_p->attr.fmtp.annex_k_val;
-        dst_attr_p->attr.fmtp.annex_n_val = src_attr_p->attr.fmtp.annex_n_val;
-        dst_attr_p->attr.fmtp.annex_p_val_picture_resize =
-            src_attr_p->attr.fmtp.annex_p_val_picture_resize;
-        dst_attr_p->attr.fmtp.annex_p_val_warp  =
-            src_attr_p->attr.fmtp.annex_p_val_warp;
-
-        dst_attr_p->attr.fmtp.annexb_required  =
-            src_attr_p->attr.fmtp.annexb_required;
-        dst_attr_p->attr.fmtp.annexa_required  =
-            src_attr_p->attr.fmtp.annexa_required;
-        dst_attr_p->attr.fmtp.fmtp_format
-            = src_attr_p->attr.fmtp.fmtp_format;
-
-        for (i=0; i < SDP_NE_NUM_BMAP_WORDS; i++) {
-            dst_attr_p->attr.fmtp.bmap[i] = src_attr_p->attr.fmtp.bmap[i];
-        }
-        break;
-
-    case SDP_ATTR_RTPMAP:
-        dst_attr_p->attr.transport_map.payload_num =
-            src_attr_p->attr.transport_map.payload_num;
-        dst_attr_p->attr.transport_map.clockrate =
-          src_attr_p->attr.transport_map.clockrate;
-        dst_attr_p->attr.transport_map.num_chan  =
-          src_attr_p->attr.transport_map.num_chan;
-        sstrncpy(dst_attr_p->attr.transport_map.encname,
-               src_attr_p->attr.transport_map.encname,
-               SDP_MAX_STRING_LEN+1);
-        break;
-
-    case SDP_ATTR_SUBNET:
-        dst_attr_p->attr.subnet.nettype  = src_attr_p->attr.subnet.nettype;
-        dst_attr_p->attr.subnet.addrtype = src_attr_p->attr.subnet.addrtype;
-        dst_attr_p->attr.subnet.prefix   = src_attr_p->attr.subnet.prefix;
-        sstrncpy(dst_attr_p->attr.subnet.addr, src_attr_p->attr.subnet.addr,
-                 SDP_MAX_STRING_LEN+1);
-        break;
-
-    case SDP_ATTR_T38_RATEMGMT:
-        dst_attr_p->attr.t38ratemgmt = src_attr_p->attr.t38ratemgmt;
-        break;
-
-    case SDP_ATTR_T38_UDPEC:
-        dst_attr_p->attr.t38udpec = src_attr_p->attr.t38udpec;
-        break;
-
-    case SDP_ATTR_X_PC_CODEC:
-        dst_attr_p->attr.pccodec.num_payloads =
-            src_attr_p->attr.pccodec.num_payloads;
-        for (i=0; i < src_attr_p->attr.pccodec.num_payloads; i++) {
-            dst_attr_p->attr.pccodec.payload_type[i] =
-                src_attr_p->attr.pccodec.payload_type[i];
-        }
-        break;
-
-    case SDP_ATTR_DIRECTION:
-
-        dst_attr_p->attr.comediadir.role =
-            src_attr_p->attr.comediadir.role;
-
-        if (src_attr_p->attr.comediadir.conn_info.nettype) {
-            dst_attr_p->attr.comediadir.conn_info_present = TRUE;
-            dst_attr_p->attr.comediadir.conn_info.nettype =
-                src_attr_p->attr.comediadir.conn_info.nettype;
-            dst_attr_p->attr.comediadir.conn_info.addrtype =
-                src_attr_p->attr.comediadir.conn_info.addrtype;
-            sstrncpy(dst_attr_p->attr.comediadir.conn_info.conn_addr,
-                     src_attr_p->attr.comediadir.conn_info.conn_addr,
-                     SDP_MAX_STRING_LEN+1);
-            dst_attr_p->attr.comediadir.src_port =
-                src_attr_p->attr.comediadir.src_port;
-        }
-        break;
-
-    case SDP_ATTR_SILENCESUPP:
-        dst_attr_p->attr.silencesupp.enabled =
-            src_attr_p->attr.silencesupp.enabled;
-        dst_attr_p->attr.silencesupp.timer_null =
-            src_attr_p->attr.silencesupp.timer_null;
-        dst_attr_p->attr.silencesupp.timer =
-            src_attr_p->attr.silencesupp.timer;
-        dst_attr_p->attr.silencesupp.pref =
-            src_attr_p->attr.silencesupp.pref;
-        dst_attr_p->attr.silencesupp.siduse =
-            src_attr_p->attr.silencesupp.siduse;
-        dst_attr_p->attr.silencesupp.fxnslevel_null =
-            src_attr_p->attr.silencesupp.fxnslevel_null;
-        dst_attr_p->attr.silencesupp.fxnslevel =
-            src_attr_p->attr.silencesupp.fxnslevel;
-        break;
-
-    case SDP_ATTR_MPTIME:
-        dst_attr_p->attr.mptime.num_intervals =
-            src_attr_p->attr.mptime.num_intervals;
-        for (i=0; i < src_attr_p->attr.mptime.num_intervals; i++) {
-            dst_attr_p->attr.mptime.intervals[i] =
-                src_attr_p->attr.mptime.intervals[i];
-        }
-        break;
-
-    case SDP_ATTR_RTR:
-        dst_attr_p->attr.rtr.confirm = src_attr_p->attr.rtr.confirm;
-        break;
-
-    case SDP_ATTR_X_SIDIN:
-    case SDP_ATTR_X_SIDOUT:
-    case SDP_ATTR_X_CONFID:
-        sstrncpy(dst_attr_p->attr.stream_data.x_sidin,
-                 src_attr_p->attr.stream_data.x_sidin,SDP_MAX_STRING_LEN+1);
-        sstrncpy(dst_attr_p->attr.stream_data.x_sidout,
-                 src_attr_p->attr.stream_data.x_sidout,SDP_MAX_STRING_LEN+1);
-        sstrncpy(dst_attr_p->attr.stream_data.x_confid,
-                 src_attr_p->attr.stream_data.x_confid,SDP_MAX_STRING_LEN+1);
-        break;
-
-    case SDP_ATTR_GROUP:
-        dst_attr_p->attr.stream_data.group_attr =
-            src_attr_p->attr.stream_data.group_attr;
-        dst_attr_p->attr.stream_data.num_group_id =
-             src_attr_p->attr.stream_data.num_group_id;
-
-        for (i=0; i < src_attr_p->attr.stream_data.num_group_id; i++) {
-            dst_attr_p->attr.stream_data.group_ids[i] =
-                cpr_strdup(src_attr_p->attr.stream_data.group_ids[i]);
-        }
-        break;
-
-    case SDP_ATTR_MSID_SEMANTIC:
-        sstrncpy(dst_attr_p->attr.msid_semantic.semantic,
-                 src_attr_p->attr.msid_semantic.semantic,
-                 SDP_MAX_STRING_LEN+1);
-        for (i=0; i < SDP_MAX_MEDIA_STREAMS; ++i) {
-          if (!src_attr_p->attr.msid_semantic.msids[i]) {
-            break;
-          }
-
-          dst_attr_p->attr.msid_semantic.msids[i] =
-            cpr_strdup(src_attr_p->attr.msid_semantic.msids[i]);
-        }
-        break;
-
-    case SDP_ATTR_SOURCE_FILTER:
-        dst_attr_p->attr.source_filter.mode =
-                         src_attr_p->attr.source_filter.mode;
-        dst_attr_p->attr.source_filter.nettype =
-                         src_attr_p->attr.source_filter.nettype;
-        dst_attr_p->attr.source_filter.addrtype =
-                         src_attr_p->attr.source_filter.addrtype;
-        sstrncpy(dst_attr_p->attr.source_filter.dest_addr,
-                 src_attr_p->attr.source_filter.dest_addr,
-                 SDP_MAX_STRING_LEN+1);
-        for (i=0; i<src_attr_p->attr.source_filter.num_src_addr; ++i) {
-            sstrncpy(dst_attr_p->attr.source_filter.src_list[i],
-                     src_attr_p->attr.source_filter.src_list[i],
-                     SDP_MAX_STRING_LEN+1);
-        }
-        dst_attr_p->attr.source_filter.num_src_addr =
-                src_attr_p->attr.source_filter.num_src_addr;
-        break;
-
-    case SDP_ATTR_SRTP_CONTEXT:
-    case SDP_ATTR_SDESCRIPTIONS:
-         /* Tag parameter is not valid for version 2 sdescriptions */
-        if (src_attr_p->type == SDP_ATTR_SDESCRIPTIONS) {
-            dst_attr_p->attr.srtp_context.tag =
-                src_attr_p->attr.srtp_context.tag;
-        }
-
-        dst_attr_p->attr.srtp_context.selection_flags =
-                    src_attr_p->attr.srtp_context.selection_flags;
-
-        dst_attr_p->attr.srtp_context.suite = src_attr_p->attr.srtp_context.suite;
-
-        dst_attr_p->attr.srtp_context.master_key_size_bytes =
-                    src_attr_p->attr.srtp_context.master_key_size_bytes;
-
-        dst_attr_p->attr.srtp_context.master_salt_size_bytes =
-                    src_attr_p->attr.srtp_context.master_salt_size_bytes;
-
-        memcpy(dst_attr_p->attr.srtp_context.master_key,
-               src_attr_p->attr.srtp_context.master_key,
-               SDP_SRTP_MAX_KEY_SIZE_BYTES);
-
-        memcpy(dst_attr_p->attr.srtp_context.master_salt,
-               src_attr_p->attr.srtp_context.master_salt,
-               SDP_SRTP_MAX_SALT_SIZE_BYTES);
-
-
-        sstrncpy((char*)dst_attr_p->attr.srtp_context.master_key_lifetime,
-                 (char*)src_attr_p->attr.srtp_context.master_key_lifetime,
-                 SDP_SRTP_MAX_LIFETIME_BYTES);
-
-        sstrncpy((char*)dst_attr_p->attr.srtp_context.mki,
-                 (char*)src_attr_p->attr.srtp_context.mki,
-                 SDP_SRTP_MAX_MKI_SIZE_BYTES);
-
-        dst_attr_p->attr.srtp_context.mki_size_bytes =
-                    src_attr_p->attr.srtp_context.mki_size_bytes;
-
-        if (src_attr_p->attr.srtp_context.session_parameters) {
-            dst_attr_p->attr.srtp_context.session_parameters =
-                        cpr_strdup(src_attr_p->attr.srtp_context.session_parameters);
-        }
-
-        break;
-
-    case SDP_ATTR_MSID:
-        sstrncpy(dst_attr_p->attr.msid.identifier,
-                 src_attr_p->attr.msid.identifier,
-                 SDP_MAX_MSID_LEN);
-        sstrncpy(dst_attr_p->attr.msid.appdata,
-                 src_attr_p->attr.msid.appdata,
-                 SDP_MAX_MSID_LEN);
-        break;
-
-    default:
-        break;
-    }
-
-    return;
-}
-
-/* Function:    sdp_copy_attr
- * Description: Copy an attribute from one SDP/level to another. A new
- *              attribute is automatically added to the end of the attr
- *              list at the dst SDP/level and all parameter values are
- *              copied.
- * Description: Add a new attribute of the specified type at the given
- *              level and capability level or base attribute if cap_num
- *              is zero.
- * Parameters:  src_sdp_p The source SDP handle.
- *              dst_sdp_p The dest SDP handle.
- *              src_level   The level of the source attribute.
- *              dst_level   The level of the source attribute.
- *              src_cap_num The src capability number associated with the
- *                          attribute if any.
- *              dst_cap_num The dst capability number associated with the
- *                          attribute if any. Note that src and dst
- *                          cap_num must both be zero or both be non-zero.
- *              src_attr_type  The type of source attribute. This cannot
- *                             be SDP_ATTR_X_CAP or SDP_ATTR_X_CPAR.
- *              src_inst_num   The instance number of the source attr.
- * Returns:     SDP_SUCCESS    Attribute was successfully copied.
- */
-sdp_result_e sdp_copy_attr (sdp_t *src_sdp_p, sdp_t *dst_sdp_p,
-                            uint16_t src_level, uint16_t dst_level,
-                            uint8_t src_cap_num, uint8_t dst_cap_num,
-                            sdp_attr_e src_attr_type, uint16_t src_inst_num)
-{
-    sdp_mca_t   *mca_p;
-    sdp_mca_t   *cap_p;
-    sdp_attr_t  *attr_p;
-    sdp_attr_t  *new_attr_p;
-    sdp_attr_t  *prev_attr_p;
-    sdp_attr_t  *src_attr_p;
-
-    if (!src_sdp_p) {
-        return (SDP_INVALID_SDP_PTR);
-    }
-
-    /* Make sure if one is a capability attribute, then both are. */
-    if (((src_cap_num == 0) && (dst_cap_num != 0)) ||
-        ((src_cap_num != 0) && (dst_cap_num == 0))) {
-        src_sdp_p->conf_p->num_invalid_param++;
-        return (SDP_INVALID_PARAMETER);
-    }
-
-    /* Cannot copy X_CAP/CDSC attributes directly using this routine.
-     * You also can't copy X_CPAR/CPAR attributes by specifying them directly,
-     * but you can copy them by giving the corresponding cap_num. */
-    if ((src_attr_type == SDP_ATTR_X_CAP) ||
-        (src_attr_type == SDP_ATTR_X_CPAR) ||
-        (src_attr_type == SDP_ATTR_CDSC) ||
-        (src_attr_type == SDP_ATTR_CPAR)) {
-        src_sdp_p->conf_p->num_invalid_param++;
-        return (SDP_INVALID_PARAMETER);
-    }
-
-    src_attr_p = sdp_find_attr(src_sdp_p, src_level, src_cap_num,
-                               src_attr_type, src_inst_num);
-    if (src_attr_p == NULL) {
-        if (src_sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            CSFLogError(logTag, "%s Error: Source attribute for copy not found.",
-                      src_sdp_p->debug_str);
-        }
-        src_sdp_p->conf_p->num_invalid_param++;
-        return (SDP_INVALID_PARAMETER);
-    }
-
-    new_attr_p = (sdp_attr_t *)SDP_MALLOC(sizeof(sdp_attr_t));
-    if (new_attr_p == NULL) {
-        src_sdp_p->conf_p->num_no_resource++;
-        return (SDP_NO_RESOURCE);
-    }
-
-    /* Copy over all the attribute information. */
-    sdp_copy_attr_fields(src_attr_p, new_attr_p);
-
-    if (src_cap_num == 0) {
-        if (dst_level == SDP_SESSION_LEVEL) {
-            if (dst_sdp_p->sess_attrs_p == NULL) {
-                dst_sdp_p->sess_attrs_p = new_attr_p;
-            } else {
-                for (prev_attr_p = dst_sdp_p->sess_attrs_p;
-                     prev_attr_p->next_p != NULL;
-                     prev_attr_p = prev_attr_p->next_p) {
-                    ; /* Empty for */
-                }
-                prev_attr_p->next_p = new_attr_p;
-            }
-        } else {
-            mca_p = sdp_find_media_level(dst_sdp_p, dst_level);
-            if (mca_p == NULL) {
-                sdp_free_attr(new_attr_p);
-                src_sdp_p->conf_p->num_invalid_param++;
-                return (SDP_INVALID_PARAMETER);
-            }
-            if (mca_p->media_attrs_p == NULL) {
-                mca_p->media_attrs_p = new_attr_p;
-            } else {
-                for (prev_attr_p = mca_p->media_attrs_p;
-                     prev_attr_p->next_p != NULL;
-                     prev_attr_p = prev_attr_p->next_p) {
-                    ; /* Empty for */
-                }
-                prev_attr_p->next_p = new_attr_p;
-            }
-        }
-    } else {
-        /* Add a new capability attribute - find the capability attr. */
-        attr_p = sdp_find_capability(dst_sdp_p, dst_level, dst_cap_num);
-        if (attr_p == NULL) {
-            sdp_free_attr(new_attr_p);
-            src_sdp_p->conf_p->num_invalid_param++;
-            return (SDP_INVALID_PARAMETER);
-        }
-        cap_p = attr_p->attr.cap_p;
-        if (cap_p->media_attrs_p == NULL) {
-            cap_p->media_attrs_p = new_attr_p;
-        } else {
-            for (prev_attr_p = cap_p->media_attrs_p;
-                 prev_attr_p->next_p != NULL;
-                 prev_attr_p = prev_attr_p->next_p) {
-                 ; /* Empty for */
-            }
-            prev_attr_p->next_p = new_attr_p;
-        }
-    }
-
-    return (SDP_SUCCESS);
-}
-
-/* Function:    sdp_copy_all_attrs
- * Description: Copy all attributes from one SDP/level to another.
- * Parameters:  src_sdp_p The source SDP handle.
- *              dst_sdp_p The dest SDP handle.
- *              src_level   The level of the source attributes.
- *              dst_level   The level of the source attributes.
- * Returns:     SDP_SUCCESS    Attributes were successfully copied.
- */
-sdp_result_e sdp_copy_all_attrs (sdp_t *src_sdp_p, sdp_t *dst_sdp_p,
-                                 uint16_t src_level, uint16_t dst_level)
-{
-    int i;
-    sdp_mca_t   *mca_p = NULL;
-    sdp_mca_t   *src_cap_p;
-    sdp_mca_t   *dst_cap_p;
-    sdp_attr_t  *src_attr_p;
-    sdp_attr_t  *dst_attr_p;
-    sdp_attr_t  *new_attr_p;
-    sdp_attr_t  *src_cap_attr_p;
-    sdp_attr_t  *dst_cap_attr_p;
-    sdp_attr_t  *new_cap_attr_p;
-
-    if (!src_sdp_p) {
-        return (SDP_INVALID_SDP_PTR);
-    }
-
-    if (!dst_sdp_p) {
-        return (SDP_INVALID_SDP_PTR);
-    }
-
-    /* Find src attribute list. */
-    if (src_level == SDP_SESSION_LEVEL) {
-        src_attr_p = src_sdp_p->sess_attrs_p;
-    } else {
-        mca_p = sdp_find_media_level(src_sdp_p, src_level);
-        if (mca_p == NULL) {
-            if (src_sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                CSFLogError(logTag, "%s Invalid src media level (%u) for copy all "
-                          "attrs ", src_sdp_p->debug_str, (unsigned)src_level);
-            }
-            return (SDP_INVALID_PARAMETER);
-        }
-        src_attr_p = mca_p->media_attrs_p;
-    }
-
-    /* Find dst attribute list. */
-    if (dst_level == SDP_SESSION_LEVEL) {
-        dst_attr_p = dst_sdp_p->sess_attrs_p;
-    } else {
-        mca_p = sdp_find_media_level(dst_sdp_p, dst_level);
-        if (mca_p == NULL) {
-            if (src_sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                CSFLogError(logTag, "%s Invalid dst media level (%u) for copy all "
-                          "attrs ", src_sdp_p->debug_str, (unsigned)dst_level);
-            }
-            return (SDP_INVALID_PARAMETER);
-        }
-        dst_attr_p = mca_p->media_attrs_p;
-    }
-
-    /* Now find the end of the dst attr list.  This is where we will
-     * add new attributes. */
-    while ((dst_attr_p != NULL) && (dst_attr_p->next_p != NULL)) {
-        dst_attr_p = dst_attr_p->next_p;
-    }
-
-    /* For each src attribute, allocate a new dst attr and copy the info */
-    while (src_attr_p != NULL) {
-
-        /* Allocate the new attr. */
-        new_attr_p = (sdp_attr_t *)SDP_MALLOC(sizeof(sdp_attr_t));
-        if (new_attr_p == NULL) {
-            src_sdp_p->conf_p->num_no_resource++;
-            return (SDP_NO_RESOURCE);
-        }
-
-        if ((src_attr_p->type != SDP_ATTR_X_CAP) &&
-            (src_attr_p->type != SDP_ATTR_CDSC)) {
-            /* Simple attr type - copy over all the attr info. */
-            sdp_copy_attr_fields(src_attr_p, new_attr_p);
-        } else {
-            /* X-cap/cdsc attrs must be handled differently. Allocate an
-             * mca structure and copy over any X-cpar/cdsc attrs. */
-
-            new_attr_p->attr.cap_p =
-                (sdp_mca_t *)SDP_MALLOC(sizeof(sdp_mca_t));
-            if (new_attr_p->attr.cap_p == NULL) {
-                sdp_free_attr(new_attr_p);
-                return (SDP_NO_RESOURCE);
-            }
-
-            new_attr_p->type = src_attr_p->type;
-
-            src_cap_p = src_attr_p->attr.cap_p;
-            dst_cap_p = new_attr_p->attr.cap_p;
-
-            dst_cap_p->media         = src_cap_p->media;
-            dst_cap_p->conn.nettype  = src_cap_p->conn.nettype;
-            dst_cap_p->conn.addrtype = src_cap_p->conn.addrtype;
-            sstrncpy(dst_cap_p->conn.conn_addr, src_cap_p->conn.conn_addr,
-                     SDP_MAX_LINE_LEN+1);
-            dst_cap_p->transport     = src_cap_p->transport;
-            dst_cap_p->port_format   = src_cap_p->port_format;
-            dst_cap_p->port          = src_cap_p->port;
-            dst_cap_p->num_ports     = src_cap_p->num_ports;
-            dst_cap_p->vpi           = src_cap_p->vpi;
-            dst_cap_p->vci           = src_cap_p->vci;
-            dst_cap_p->vcci          = src_cap_p->vcci;
-            dst_cap_p->cid           = src_cap_p->cid;
-            dst_cap_p->num_payloads  = src_cap_p->num_payloads;
-            dst_cap_p->mid           = src_cap_p->mid;
-
-            for (i=0; i < SDP_MAX_PAYLOAD_TYPES; i++) {
-                new_attr_p->attr.cap_p->payload_indicator[i] =
-                    src_attr_p->attr.cap_p->payload_indicator[i];
-                new_attr_p->attr.cap_p->payload_type[i] =
-                    src_attr_p->attr.cap_p->payload_type[i];
-            }
-
-            src_cap_attr_p = src_attr_p->attr.cap_p->media_attrs_p;
-            dst_cap_attr_p = NULL;
-
-            /* Copy all of the X-cpar/cpar attrs from the src. */
-            while (src_cap_attr_p != NULL) {
-
-                new_cap_attr_p = (sdp_attr_t *)SDP_MALLOC(sizeof(sdp_attr_t));
-                if (new_cap_attr_p == NULL) {
-                    sdp_free_attr (new_attr_p);
-                    return (SDP_NO_RESOURCE);
-                }
-
-                /* Copy X-cpar/cpar attribute info. */
-                sdp_copy_attr_fields(src_cap_attr_p, new_cap_attr_p);
-
-                /* Now add the new X-cpar/cpar attr in the right place. */
-                if (dst_cap_attr_p == NULL) {
-                    new_attr_p->attr.cap_p->media_attrs_p = new_cap_attr_p;
-                    dst_cap_attr_p = new_cap_attr_p;
-                } else {
-                    dst_cap_attr_p->next_p = new_cap_attr_p;
-                    dst_cap_attr_p = new_cap_attr_p;
-                }
-
-                /* Move to the next X-cpar/cpar attr. */
-                src_cap_attr_p = src_cap_attr_p->next_p;
-            }
-
-        }
-
-        /* New add the new base attr at the correct place. */
-        if (dst_attr_p == NULL) {
-            if (dst_level == SDP_SESSION_LEVEL) {
-                dst_sdp_p->sess_attrs_p = new_attr_p;
-                dst_attr_p = dst_sdp_p->sess_attrs_p;
-            } else {
-                mca_p->media_attrs_p = new_attr_p;
-                dst_attr_p = mca_p->media_attrs_p;
-            }
-        } else {
-            dst_attr_p->next_p = new_attr_p;
-            dst_attr_p = dst_attr_p->next_p;
-        }
-
-        /* Now move on to the next src attr. */
-        src_attr_p = src_attr_p->next_p;
-    }
-
-    return (SDP_SUCCESS);
-}
-
 /* Function:    sdp_attr_num_instances
  * Description: Get the number of attributes of the specified type at
  *              the given level and capability level.
  * Parameters:  sdp_p     The SDP handle returned by sdp_init_description.
  *              level       The level to check for the attribute.
  *              cap_num     The capability number associated with the
  *                          attribute if any.  If none, should be zero.
  *              attr_type   The type of attribute to add.
@@ -1028,111 +352,16 @@ sdp_result_e sdp_attr_num_instances (sdp
         }
 
     }
 
     return (rc);
 }
 
 
-/* Function:    sdp_get_total_attrs
- * Description: Get the total number of attributes at the given level and
- *              capability level.
- * Parameters:  sdp_p     The SDP handle returned by sdp_init_description.
- *              level       The level to check for the attribute.
- *              cap_num     The capability number associated with the
- *                          attribute if any.  If none, should be zero.
- *              num_attrs   Pointer to a uint16_t in which to return the
- *                          number of attributes.
- * Returns:     SDP_SUCCESS            Attribute was added successfully.
- *              SDP_INVALID_PARAMETER  Specified media line is not defined.
- */
-sdp_result_e sdp_get_total_attrs (sdp_t *sdp_p, uint16_t level, uint8_t cap_num,
-                                  uint16_t *num_attrs)
-{
-    sdp_attr_t  *attr_p;
-    sdp_result_e rc;
-    static char  fname[] = "get_total_attrs";
-
-    *num_attrs = 0;
-
-    rc = sdp_find_attr_list(sdp_p, level, cap_num, &attr_p, fname);
-    if (rc == SDP_SUCCESS) {
-        /* Found the attr list. Count the total number of attrs
-         * at this level. */
-        for (; attr_p != NULL; attr_p = attr_p->next_p) {
-            (*num_attrs)++;
-        }
-
-    }
-
-    return (rc);
-}
-
-
-/* Function:    sdp_get_attr_type
- * Description: Given an overall attribute number at a specified level, i.e.,
- *              attr number is not specific to the type of attribute, return
- *              the attribute type and the instance number of that particular
- *              type of attribute.
- * Parameters:  sdp_p     The SDP handle returned by sdp_init_description.
- *              level       The level to check for the attribute.
- *              cap_num     The capability number associated with the
- *                          attribute if any.  If none, should be zero.
- *              attr_num    Attribute number to retrieve. This is an overall
- *                          attribute number over all attrs at this level.
- *                          Range is (1 - max attrs at this level).
- * Returns:     SDP_SUCCESS            Attribute was added successfully.
- *              SDP_INVALID_PARAMETER  Specified media line is not defined.
- */
-sdp_result_e sdp_get_attr_type (sdp_t *sdp_p, uint16_t level, uint8_t cap_num,
-                           uint16_t attr_num, sdp_attr_e *attr_type, uint16_t *inst_num)
-{
-    int          i;
-    uint16_t          attr_total_count=0;
-    uint16_t          attr_count[SDP_MAX_ATTR_TYPES];
-    sdp_attr_t  *attr_p;
-    sdp_result_e rc;
-    static char  fname[] = "get_attr_type";
-
-    *attr_type = SDP_ATTR_INVALID;
-    *inst_num = 0;
-
-    if (attr_num < 1) {
-        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-            CSFLogError(logTag, "%s %s, invalid attr num specified (%u) at level %u",
-                      sdp_p->debug_str, fname, (unsigned)attr_num, (unsigned)level);
-        }
-        sdp_p->conf_p->num_invalid_param++;
-        return (SDP_INVALID_PARAMETER);
-    }
-
-    for (i=0; i < SDP_MAX_ATTR_TYPES; i++) {
-        attr_count[i] = 0;
-    }
-
-    rc = sdp_find_attr_list(sdp_p, level, cap_num, &attr_p, fname);
-    if (rc == SDP_SUCCESS) {
-        /* Found the attr list. Now find the particular attribute
-         * at the given level. */
-        for (; attr_p != NULL; attr_p = attr_p->next_p) {
-            attr_count[attr_p->type]++;
-            if (++attr_total_count == attr_num) {
-                *attr_type = attr_p->type;
-                *inst_num = attr_count[attr_p->type];
-                break;
-            }
-        }
-
-    }
-
-    return (rc);
-}
-
-
 /* Internal routine to free the memory associated with an attribute.
  * Certain attributes allocate additional memory.  Free this and then
  * free the attribute itself.
  * Note that this routine may be called at any point (i.e., may be
  * called due to a failure case) and so the additional memory
  * associated with an attribute may or may not have been already
  * allocated. This routine should check this carefully.
  */
@@ -1173,194 +402,16 @@ void sdp_free_attr (sdp_attr_t *attr_p)
     }
 
     /* Now free the actual attribute memory. */
     SDP_FREE(attr_p);
 
 }
 
 
-/* Function:    sdp_delete_attr
- * Description: Delete the specified attribute from the SDP structure.
- * Parameters:  sdp_p     The SDP handle returned by sdp_init_description.
- *              level       The level to check for the attribute.
- *              cap_num     The capability number associated with the
- *                          attribute if any.  If none, should be zero.
- *              attr_type   The type of attribute to delete.
- *              inst_num    The instance num of the attribute to delete.
- * Returns:     SDP_SUCCESS            Attribute was deleted successfully.
- *              SDP_INVALID_PARAMETER  Specified attribute is not defined.
- */
-sdp_result_e sdp_delete_attr (sdp_t *sdp_p, uint16_t level, uint8_t cap_num,
-                              sdp_attr_e attr_type, uint16_t inst_num)
-{
-    uint16_t          attr_count=0;
-    sdp_mca_t   *mca_p;
-    sdp_mca_t   *cap_p;
-    sdp_attr_t  *attr_p;
-    sdp_attr_t  *prev_attr_p = NULL;
-
-    if (cap_num == 0) {
-        /* Find and delete the specified instance. */
-        if (level == SDP_SESSION_LEVEL) {
-            for (attr_p = sdp_p->sess_attrs_p; attr_p != NULL;
-                 prev_attr_p = attr_p, attr_p = attr_p->next_p) {
-                if (attr_p->type == attr_type) {
-                    attr_count++;
-                    if (attr_count == inst_num) {
-                        break;
-                    }
-                }
-            }
-            if (attr_p == NULL) {
-                if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                    CSFLogError(logTag, "%s Delete attribute (%s) instance %u not "
-                              "found.", sdp_p->debug_str,
-                              sdp_get_attr_name(attr_type), (unsigned)inst_num);
-                }
-                sdp_p->conf_p->num_invalid_param++;
-                return (SDP_INVALID_PARAMETER);
-            }
-            if (prev_attr_p == NULL) {
-                sdp_p->sess_attrs_p = attr_p->next_p;
-            } else {
-                prev_attr_p->next_p = attr_p->next_p;
-            }
-            sdp_free_attr(attr_p);
-        } else {  /* Attr is at a media level */
-            mca_p = sdp_find_media_level(sdp_p, level);
-            if (mca_p == NULL) {
-                sdp_p->conf_p->num_invalid_param++;
-                return (SDP_INVALID_PARAMETER);
-            }
-            for (attr_p = mca_p->media_attrs_p; attr_p != NULL;
-                 prev_attr_p = attr_p, attr_p = attr_p->next_p) {
-                if (attr_p->type == attr_type) {
-                    attr_count++;
-                    if (attr_count == inst_num) {
-                        break;
-                    }
-                }
-            }
-            if (attr_p == NULL) {
-                if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                    CSFLogError(logTag, "%s Delete attribute (%s) instance %u "
-                              "not found.", sdp_p->debug_str,
-                              sdp_get_attr_name(attr_type), (unsigned)inst_num);
-                }
-                sdp_p->conf_p->num_invalid_param++;
-                return (SDP_INVALID_PARAMETER);
-            }
-            if (prev_attr_p == NULL) {
-                mca_p->media_attrs_p = attr_p->next_p;
-            } else {
-                prev_attr_p->next_p = attr_p->next_p;
-            }
-            sdp_free_attr(attr_p);
-        }  /* Attr is at a media level */
-    } else {
-        /* Attr is a capability X-cpar/cpar attribute, find the capability. */
-        attr_p = sdp_find_capability(sdp_p, level, cap_num);
-        if (attr_p == NULL) {
-            sdp_p->conf_p->num_invalid_param++;
-            return (SDP_INVALID_PARAMETER);
-        }
-        cap_p = attr_p->attr.cap_p;
-        /* Now find the specific attribute to delete. */
-        for (attr_p = cap_p->media_attrs_p; attr_p != NULL;
-             prev_attr_p = attr_p, attr_p = attr_p->next_p) {
-            if (attr_p->type == attr_type) {
-                attr_count++;
-                if (attr_count == inst_num) {
-                    break;
-                }
-            }
-        }
-        if (attr_p == NULL) {
-            if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
-                CSFLogError(logTag, "%s Delete X-cpar/cpar attribute (%s) cap_num %u, "
-                          "instance %u not found.", sdp_p->debug_str,
-                          sdp_get_attr_name(attr_type), (unsigned)cap_num, (unsigned)inst_num);
-            }
-            sdp_p->conf_p->num_invalid_param++;
-            return (SDP_INVALID_PARAMETER);
-        }
-        if (prev_attr_p == NULL) {
-            cap_p->media_attrs_p = attr_p->next_p;
-        } else {
-            prev_attr_p->next_p = attr_p->next_p;
-        }
-        sdp_free_attr(attr_p);
-    }
-
-    return (SDP_SUCCESS);
-}
-
-
-/* Function:    sdp_delete_all_attrs
- * Description: Delete all attributes at the specified level from
- *              the SDP structure.
- * Parameters:  sdp_p     The SDP handle returned by sdp_init_description.
- *              level       The level to check for the attribute.
- *              cap_num     The capability number associated with the
- *                          attribute if any.  If none, should be zero.
- * Returns:     SDP_SUCCESS            Attributes were deleted successfully.
- */
-sdp_result_e sdp_delete_all_attrs (sdp_t *sdp_p, uint16_t level, uint8_t cap_num)
-{
-    sdp_mca_t   *mca_p;
-    sdp_mca_t   *cap_p;
-    sdp_attr_t  *attr_p;
-    sdp_attr_t  *next_attr_p = NULL;
-
-    if (cap_num == 0) {
-        if (level == SDP_SESSION_LEVEL) {
-            attr_p = sdp_p->sess_attrs_p;
-            while (attr_p != NULL) {
-                next_attr_p = attr_p->next_p;
-                sdp_free_attr(attr_p);
-                attr_p = next_attr_p;
-            }
-            sdp_p->sess_attrs_p = NULL;
-        } else {  /* Attr is at a media level */
-            mca_p = sdp_find_media_level(sdp_p, level);
-            if (mca_p == NULL) {
-                sdp_p->conf_p->num_invalid_param++;
-                return (SDP_INVALID_PARAMETER);
-            }
-            attr_p = mca_p->media_attrs_p;
-            while (attr_p != NULL) {
-                next_attr_p = attr_p->next_p;
-                sdp_free_attr(attr_p);
-                attr_p = next_attr_p;
-            }
-            mca_p->media_attrs_p = NULL;
-        }
-    } else {
-        /* Attr is a capability X-cpar/cpar attribute, find the capability. */
-        attr_p = sdp_find_capability(sdp_p, level, cap_num);
-        if (attr_p == NULL) {
-            sdp_p->conf_p->num_invalid_param++;
-            return (SDP_INVALID_PARAMETER);
-        }
-        cap_p = attr_p->attr.cap_p;
-        /* Now find the specific attribute to delete. */
-        attr_p = cap_p->media_attrs_p;
-        while (attr_p != NULL) {
-            next_attr_p = attr_p->next_p;
-            sdp_free_attr(attr_p);
-            attr_p = next_attr_p;
-        }
-        cap_p->media_attrs_p = NULL;
-    }
-
-    return (SDP_SUCCESS);
-}
-
-
 /* Function:    sdp_find_attr_list
  * Description: Find the attribute list for the specified level and cap_num.
  *              Note: This is not an API for the application but an internal
  *              routine used by the SDP library.
  * Parameters:  sdp_p       Pointer to the SDP to search.
  *              level       The level to check for the attribute list.
  *              cap_num     The capability number associated with the
  *                          attribute list.  If none, should be zero.