Changeset 830


Ignore:
Timestamp:
Nov 25, 2006 8:48:54 AM (14 years ago)
Author:
bennylp
Message:

Minor fix in UDP media: transport should silently ignore detach command when it's not attached

File:
1 edited

Legend:

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

    r773 r830  
    584584    pj_assert(tp); 
    585585 
    586     /* User data is unreferenced on Release build */ 
    587     PJ_UNUSED_ARG(user_data); 
    588  
    589     /* As additional checking, check if the same user data is specified */ 
    590     pj_assert(user_data == udp->user_data); 
    591  
    592     /* First, mark transport as unattached */ 
    593     udp->attached = PJ_FALSE; 
    594  
    595     /* Clear up application infos from transport */ 
    596     udp->rtp_cb = NULL; 
    597     udp->rtcp_cb = NULL; 
    598     udp->user_data = NULL; 
     586    if (udp->attached) { 
     587        /* User data is unreferenced on Release build */ 
     588        PJ_UNUSED_ARG(user_data); 
     589 
     590        /* As additional checking, check if the same user data is specified */ 
     591        pj_assert(user_data == udp->user_data); 
     592 
     593        /* First, mark transport as unattached */ 
     594        udp->attached = PJ_FALSE; 
     595 
     596        /* Clear up application infos from transport */ 
     597        udp->rtp_cb = NULL; 
     598        udp->rtcp_cb = NULL; 
     599        udp->user_data = NULL; 
     600    } 
    599601} 
    600602 
Note: See TracChangeset for help on using the changeset viewer.