Ignore:
Timestamp:
Sep 18, 2011 2:59:56 PM (13 years ago)
Author:
bennylp
Message:

Modified the libraries to use the new log indentation feature re #1372

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c

    r3553 r3753  
    19171917    PJ_ASSERT_RETURN(inv->invite_tsx, PJ_EBUG); 
    19181918 
     1919    pj_log_push_indent(); 
     1920 
    19191921    pjsip_dlg_inc_lock(inv->dlg); 
    19201922 
     
    19641966on_return: 
    19651967    pjsip_dlg_dec_lock(inv->dlg); 
     1968    pj_log_pop_indent(); 
    19661969    return status; 
    19671970} 
     
    19901993    PJ_ASSERT_RETURN(inv->last_answer, PJ_EINVALIDOP); 
    19911994 
     1995    pj_log_push_indent(); 
     1996 
    19921997    pjsip_dlg_inc_lock(inv->dlg); 
    19931998 
     
    20172022on_return: 
    20182023    pjsip_dlg_dec_lock(inv->dlg); 
     2024    pj_log_pop_indent(); 
    20192025    return status; 
    20202026} 
     
    20522058    /* Verify arguments. */ 
    20532059    PJ_ASSERT_RETURN(inv && p_tdata, PJ_EINVAL); 
     2060 
     2061    pj_log_push_indent(); 
    20542062 
    20552063    /* Set cause code. */ 
     
    20822090                PJ_LOG(4, (inv->obj_name, "Delaying CANCEL since no " 
    20832091                           "provisional response is received yet")); 
     2092                pj_log_pop_indent(); 
    20842093                return PJ_SUCCESS; 
    20852094            } 
     
    20932102                                               inv->invite_tsx->last_tx, 
    20942103                                               &tdata); 
    2095             if (status != PJ_SUCCESS) 
     2104            if (status != PJ_SUCCESS) { 
     2105                pj_log_pop_indent(); 
    20962106                return status; 
     2107            } 
    20972108 
    20982109            /* Set timeout for the INVITE transaction, in case UAS is not 
     
    21262137    case PJSIP_INV_STATE_DISCONNECTED: 
    21272138        /* No need to do anything. */ 
     2139        pj_log_pop_indent(); 
    21282140        return PJSIP_ESESSIONTERMINATED; 
    21292141 
    21302142    default: 
    21312143        pj_assert("!Invalid operation!"); 
     2144        pj_log_pop_indent(); 
    21322145        return PJ_EINVALIDOP; 
    21332146    } 
    21342147 
    2135     if (status != PJ_SUCCESS) 
     2148    if (status != PJ_SUCCESS) { 
     2149        pj_log_pop_indent(); 
    21362150        return status; 
     2151    } 
    21372152 
    21382153 
     
    21422157    *p_tdata = tdata; 
    21432158 
     2159    pj_log_pop_indent(); 
    21442160    return PJ_SUCCESS; 
    21452161} 
     
    23642380        return PJ_EINVALIDOP; 
    23652381 
     2382    pj_log_push_indent(); 
    23662383 
    23672384    pjsip_dlg_inc_lock(inv->dlg); 
     
    24342451on_return: 
    24352452    pjsip_dlg_dec_lock(inv->dlg); 
     2453    pj_log_pop_indent(); 
    24362454    return status; 
    24372455} 
     
    24602478    PJ_ASSERT_RETURN(inv->state < PJSIP_INV_STATE_DISCONNECTED, 
    24612479                     PJ_EINVALIDOP); 
     2480 
     2481    pj_log_push_indent(); 
    24622482 
    24632483    /* Lock dialog. */ 
     
    25232543    *p_tdata = tdata; 
    25242544 
     2545    pj_log_pop_indent(); 
    25252546    return PJ_SUCCESS; 
    25262547 
     
    25322553    pjsip_dlg_dec_lock(inv->dlg); 
    25332554 
     2555    pj_log_pop_indent(); 
    25342556    return status; 
    25352557} 
     
    25942616    PJ_ASSERT_RETURN(inv && tdata, PJ_EINVAL); 
    25952617 
     2618    pj_log_push_indent(); 
     2619 
    25962620    PJ_LOG(5,(inv->obj_name, "Sending %s",  
    25972621              pjsip_tx_data_get_info(tdata))); 
     
    26082632            pjsip_tx_data_dec_ref(tdata); 
    26092633            pjsip_dlg_dec_lock(inv->dlg); 
    2610             return PJ_EINVALIDOP; 
     2634            status = PJ_EINVALIDOP; 
     2635            goto on_error; 
    26112636        } 
    26122637 
     
    26192644        status = pjsip_dlg_send_request(inv->dlg, tdata, mod_inv.mod.id,  
    26202645                                        tsx_inv_data); 
    2621         if (status != PJ_SUCCESS) 
    2622             return status; 
     2646        if (status != PJ_SUCCESS) { 
     2647            goto on_error; 
     2648        } 
    26232649 
    26242650    } else { 
     
    26392665        } 
    26402666 
    2641         if (status != PJ_SUCCESS) 
    2642             return status; 
    2643     } 
    2644  
    2645     /* Done (?) */ 
     2667        if (status != PJ_SUCCESS) { 
     2668            goto on_error; 
     2669        } 
     2670    } 
     2671 
     2672    /* Done */ 
     2673    pj_log_pop_indent(); 
    26462674    return PJ_SUCCESS; 
     2675 
     2676on_error: 
     2677    pj_log_pop_indent(); 
     2678    return status; 
    26472679} 
    26482680 
Note: See TracChangeset for help on using the changeset viewer.