Changeset 2129 for pjproject/trunk


Ignore:
Timestamp:
Jul 13, 2008 11:51:28 AM (16 years ago)
Author:
bennylp
Message:

Set default UDP media transport name if name is not specified by application, otherwise memory pool name will be empty

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/transport_udp.c

    r2039 r2129  
    285285    ioqueue = pjmedia_endpt_get_ioqueue(endpt); 
    286286 
     287    if (name==NULL) 
     288        name = "udp%p"; 
     289 
    287290    /* Create transport structure */ 
    288291    pool = pjmedia_endpt_create_pool(endpt, name, 512, 512); 
     
    290293        return PJ_ENOMEM; 
    291294 
    292     if (!name) 
    293         name = pool->obj_name; 
    294  
    295295    tp = PJ_POOL_ZALLOC_T(pool, struct transport_udp); 
    296296    tp->pool = pool; 
    297297    tp->options = options; 
    298     pj_ansi_strncpy(tp->base.name, name, PJ_MAX_OBJ_NAME-1); 
     298    pj_memcpy(tp->base.name, pool->obj_name, PJ_MAX_OBJ_NAME); 
    299299    tp->base.op = &transport_udp_op; 
    300300    tp->base.type = PJMEDIA_TRANSPORT_TYPE_UDP; 
Note: See TracChangeset for help on using the changeset viewer.