Ignore:
Timestamp:
Mar 24, 2007 1:00:30 PM (17 years ago)
Author:
bennylp
Message:

ICE (work in progress): implement error codes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjnath/src/pjnath/ice.c

    r1099 r1101  
    5858 
    5959#define CHECK_NAME_LEN      128 
    60 #define LOG(expr)           PJ_LOG(4,expr) 
     60#define LOG4(expr)          PJ_LOG(4,expr) 
     61#define LOG5(expr)          PJ_LOG(4,expr) 
    6162#define GET_LCAND_ID(cand)  (cand - ice->lcand) 
    6263#define GET_CHECK_ID(chk)   (chk - ice->clist.checks) 
     
    136137                                  const char *name, 
    137138                                  pj_ice_role role, 
     139                                  unsigned comp_cnt, 
    138140                                  const pj_ice_cb *cb, 
    139141                                  const pj_str_t *local_ufrag, 
     
    171173    pj_memcpy(&ice->stun_cfg, stun_cfg, sizeof(*stun_cfg)); 
    172174 
    173     for (i=0; i<PJ_ICE_MAX_COMP; ++i) { 
    174         ice->comp[i].nominated_check_id = -1; 
     175    ice->comp_cnt = comp_cnt; 
     176    for (i=0; i<comp_cnt; ++i) { 
     177        pj_ice_comp *comp; 
     178        comp = &ice->comp[i]; 
     179        comp->comp_id = i+1; 
     180        comp->nominated_check_id = -1; 
    175181    } 
    176182 
     
    193199    *p_ice = ice; 
    194200 
    195     LOG((ice->obj_name, "ICE stream session created, role is %s agent", 
    196         (ice->role==PJ_ICE_ROLE_CONTROLLING ? "controlling" : "controlled"))); 
     201    LOG4((ice->obj_name, "ICE stream session created, role is %s agent", 
     202         (ice->role==PJ_ICE_ROLE_CONTROLLING ? "controlling" : "controlled"))); 
    197203 
    198204    return PJ_SUCCESS; 
     
    209215 
    210216    if (reason == PJ_SUCCESS) { 
    211         LOG((ice->obj_name, "Destroying ICE session")); 
    212     } 
    213  
    214     for (i=0; i<ice->comp_cnt; ++i) { 
    215         /* Nothing to do */ 
     217        LOG4((ice->obj_name, "Destroying ICE session")); 
    216218    } 
    217219 
     
    251253static pj_ice_comp *find_comp(const pj_ice *ice, unsigned comp_id) 
    252254{ 
    253     unsigned i; 
    254     for (i=0; i<ice->comp_cnt; ++i) { 
    255         if (ice->comp[i].comp_id == comp_id) 
    256             return (pj_ice_comp *) &ice->comp[i]; 
    257     } 
    258  
    259     return NULL; 
    260 } 
    261  
    262  
    263 /* Add a new component */ 
    264 PJ_DEF(pj_status_t) pj_ice_add_comp(pj_ice *ice, unsigned comp_id) 
    265 { 
    266     pj_ice_comp *comp; 
    267  
    268     PJ_ASSERT_RETURN(ice && comp_id, PJ_EINVAL); 
    269     PJ_ASSERT_RETURN(ice->comp_cnt < PJ_ARRAY_SIZE(ice->comp), PJ_ETOOMANY); 
    270     PJ_ASSERT_RETURN(comp_id==ice->comp_cnt+1, PJ_EICEINCOMPID); 
    271     PJ_ASSERT_RETURN(find_comp(ice, comp_id) == NULL, PJ_EEXISTS); 
    272  
    273     pj_mutex_lock(ice->mutex); 
    274  
    275     comp = &ice->comp[ice->comp_cnt]; 
    276     comp->comp_id = comp_id; 
    277     comp->nominated_check_id = -1; 
    278  
    279     /* Done */ 
    280     ice->comp_cnt++; 
    281     pj_mutex_unlock(ice->mutex); 
    282  
    283     return PJ_SUCCESS; 
    284 } 
     255    pj_assert(comp_id > 0 && comp_id <= ice->comp_cnt); 
     256    return (pj_ice_comp*) &ice->comp[comp_id-1]; 
     257} 
     258 
    285259 
    286260static pj_status_t stun_auth_get_auth(void *user_data, 
     
    357331        /* Verify username */ 
    358332        if (pj_strcmp(username, &ice->tx_uname) != 0) 
    359             return -1; 
     333            return PJ_STATUS_FROM_STUN_CODE(PJ_STUN_SC_UNKNOWN_USERNAME); 
    360334        *data_type = 0; 
    361335        *data = ice->tx_pass; 
     
    408382    }; 
    409383 
    410     return ((1 << 24) * type_pref[type]) +  
    411            ((1 << 8) * local_pref) + 
    412            (256 - comp_id); 
     384    return ((type_pref[type] & 0xFF) << 24) +  
     385           ((local_pref & 0xFFFF)    << 8) + 
     386           (((256 - comp_id) & 0xFF) << 0); 
    413387} 
    414388 
     
    424398                                    const pj_sockaddr_t *addr, 
    425399                                    const pj_sockaddr_t *base_addr, 
    426                                     const pj_sockaddr_t *srv_addr, 
     400                                    const pj_sockaddr_t *rel_addr, 
    427401                                    int addr_len, 
    428402                                    unsigned *p_cand_id) 
     
    453427    pj_memcpy(&lcand->addr, addr, addr_len); 
    454428    pj_memcpy(&lcand->base_addr, base_addr, addr_len); 
    455     if (srv_addr) 
    456         pj_memcpy(&lcand->srv_addr, srv_addr, addr_len); 
     429    if (rel_addr) 
     430        pj_memcpy(&lcand->rel_addr, rel_addr, addr_len); 
    457431    else 
    458         pj_bzero(&lcand->srv_addr, sizeof(lcand->srv_addr)); 
     432        pj_bzero(&lcand->rel_addr, sizeof(lcand->rel_addr)); 
    459433 
    460434    /* Init STUN callbacks */ 
     
    493467 
    494468    pj_ansi_strcpy(tmp, pj_inet_ntoa(lcand->addr.ipv4.sin_addr)); 
    495     LOG((ice->obj_name,  
     469    LOG4((ice->obj_name,  
    496470         "Candidate %d added: comp_id=%d, type=%s, foundation=%.*s, " 
    497471         "addr=%s:%d, base=%s:%d, prio=0x%x (%u)", 
     
    518492 
    519493 
    520 PJ_DEF(unsigned) pj_ice_get_cand_cnt(pj_ice *ice) 
    521 { 
    522     return ice->lcand_cnt; 
    523 } 
    524  
    525  
    526 PJ_DEF(pj_status_t) pj_ice_enum_cands(pj_ice *ice, 
    527                                       unsigned *p_count, 
    528                                       unsigned cand_ids[]) 
    529 { 
    530     unsigned i, count; 
    531  
    532     PJ_ASSERT_RETURN(ice && p_count && *p_count && cand_ids, PJ_EINVAL); 
     494PJ_DEF(pj_status_t) pj_ice_find_default_cand(pj_ice *ice, 
     495                                             unsigned comp_id, 
     496                                             int *cand_id) 
     497{ 
     498    unsigned i; 
     499 
     500    PJ_ASSERT_RETURN(ice && comp_id && cand_id, PJ_EINVAL); 
     501 
     502    *cand_id = -1; 
    533503 
    534504    pj_mutex_lock(ice->mutex); 
    535505 
    536     count = (*p_count < ice->lcand_cnt) ? *p_count : ice->lcand_cnt; 
    537     for (i=0; i<count; ++i) 
    538         cand_ids[i] = i; 
    539  
    540     *p_count = count; 
    541     pj_mutex_unlock(ice->mutex); 
    542  
    543     return PJ_SUCCESS; 
    544 } 
    545  
    546  
    547 PJ_DEF(pj_status_t) pj_ice_get_default_cand(pj_ice *ice, 
    548                                             unsigned comp_id, 
    549                                             int *cand_id) 
    550 { 
    551     unsigned i; 
    552  
    553     PJ_ASSERT_RETURN(ice && comp_id && cand_id, PJ_EINVAL); 
    554  
    555     *cand_id = -1; 
    556  
    557     pj_mutex_lock(ice->mutex); 
    558  
    559506    /* First find in valid list if we have nominated pair */ 
    560     for (i=0; i<ice->valid_cnt; ++i) { 
    561         pj_ice_cand *lcand; 
     507    for (i=0; i<ice->valid_list.count; ++i) { 
     508        pj_ice_check *check = &ice->valid_list.checks[i]; 
    562509         
    563         lcand = ice->clist.checks[ice->valid_list[i]].lcand; 
    564         if (lcand->comp_id==comp_id) { 
    565             *cand_id = GET_LCAND_ID(lcand); 
     510        if (check->lcand->comp_id == comp_id) { 
     511            *cand_id = GET_LCAND_ID(check->lcand); 
    566512            pj_mutex_unlock(ice->mutex); 
    567513            return PJ_SUCCESS; 
     
    609555 
    610556    pj_assert(!"Should have a candidate by now"); 
    611     return PJ_EICENOCAND; 
    612 } 
    613  
    614  
    615 PJ_DEF(pj_status_t) pj_ice_get_cand(pj_ice *ice, 
    616                                     unsigned cand_id, 
    617                                     pj_ice_cand **p_cand) 
    618 { 
    619     PJ_ASSERT_RETURN(ice && p_cand, PJ_EINVAL); 
    620     PJ_ASSERT_RETURN(cand_id <= ice->lcand_cnt, PJ_EINVAL); 
    621  
    622     *p_cand = &ice->lcand[cand_id]; 
    623  
    624     return PJ_SUCCESS; 
    625 } 
     557    return PJ_EBUG; 
     558} 
     559 
    626560 
    627561#ifndef MIN 
     
    690624    char buffer[CHECK_NAME_LEN]; 
    691625 
    692     LOG((ice->obj_name, "%s", title)); 
     626    LOG4((ice->obj_name, "%s", title)); 
    693627    for (i=0; i<clist->count; ++i) { 
    694628        const pj_ice_check *c = &clist->checks[i]; 
    695         LOG((ice->obj_name, " %s (%s, state=%s)", 
     629        LOG4((ice->obj_name, " %s (%s, state=%s)", 
    696630             dump_check(buffer, sizeof(buffer), ice, c), 
    697631             (c->nominated ? "nominated" : "not nominated"),  
     
    700634} 
    701635 
    702 static void dump_valid_list(const char *title, const pj_ice *ice) 
    703 { 
    704     unsigned i; 
    705     char buffer[CHECK_NAME_LEN]; 
    706  
    707     LOG((ice->obj_name, "%s", title)); 
    708     for (i=0; i<ice->valid_cnt; ++i) { 
    709         const pj_ice_check *c = &ice->clist.checks[ice->valid_list[i]]; 
    710         LOG((ice->obj_name, " %s (%s, state=%s)", 
    711              dump_check(buffer, sizeof(buffer), ice, c), 
    712              (c->nominated ? "nominated" : "not nominated"),  
    713              check_state_name[c->state])); 
    714     } 
    715 } 
    716  
    717636#else 
    718637#define dump_checklist(ice, clist) 
     
    727646    pj_assert(check->state < PJ_ICE_CHECK_STATE_SUCCEEDED); 
    728647 
    729     LOG((ice->obj_name, "Check %s: state changed from %s to %s", 
     648    LOG5((ice->obj_name, "Check %s: state changed from %s to %s", 
    730649         dump_check(buf, sizeof(buf), ice, check), 
    731650         check_state_name[check->state], 
     
    739658{ 
    740659    if (clist->state != st) { 
    741         LOG((ice->obj_name, "Checklist: state changed from %s to %s", 
     660        LOG5((ice->obj_name, "Checklist: state changed from %s to %s", 
    742661             clist_state_name[clist->state], 
    743662             clist_state_name[st])); 
     
    769688    } 
    770689} 
    771  
    772 /* Sort valid list based on priority */ 
    773 static void sort_valid_list(pj_ice *ice) 
    774 { 
    775     unsigned i; 
    776  
    777     for (i=0; i<ice->valid_cnt-1; ++i) { 
    778         unsigned j, highest = i; 
    779         pj_ice_check *ci = &ice->clist.checks[ice->valid_list[i]]; 
    780  
    781         for (j=i+1; j<ice->valid_cnt; ++j) { 
    782             pj_ice_check *cj = &ice->clist.checks[ice->valid_list[j]]; 
    783  
    784             if (cj->prio > ci->prio) { 
    785                 highest = j; 
    786             } 
    787         } 
    788  
    789         if (highest != i) { 
    790             unsigned tmp = ice->valid_list[i]; 
    791             ice->valid_list[i] = ice->valid_list[j]; 
    792             ice->valid_list[j] = tmp; 
    793         } 
    794     } 
    795 } 
    796  
    797690 
    798691enum  
     
    866759                char buf[CHECK_NAME_LEN]; 
    867760 
    868                 LOG((ice->obj_name, "Check %s pruned", 
     761                LOG5((ice->obj_name, "Check %s pruned", 
    869762                    dump_check(buf, sizeof(buf), ice, &clist->checks[j]))); 
    870763 
     
    890783     
    891784        /* Log message */ 
    892         LOG((ice->obj_name, "ICE process complete, status=%s",  
     785        LOG4((ice->obj_name, "ICE process complete, status=%s",  
    893786             pj_strerror(status, errmsg, sizeof(errmsg)).ptr)); 
    894787 
    895         dump_checklist("Dumping checklist", ice, &ice->clist); 
    896         dump_valid_list("Dumping valid list", ice); 
     788        dump_checklist("Valid list", ice, &ice->valid_list); 
    897789 
    898790        /* Call callback */ 
     
    922814        pj_ice_comp *comp; 
    923815 
    924         LOG((ice->obj_name, "Check %d is successful and nominated", 
     816        LOG5((ice->obj_name, "Check %d is successful and nominated", 
    925817             GET_CHECK_ID(check))); 
    926818 
     
    931823                 c->state==PJ_ICE_CHECK_STATE_WAITING)) 
    932824            { 
    933                 LOG((ice->obj_name,  
     825                LOG5((ice->obj_name,  
    934826                     "Check %d to be failed because state is %s", 
    935827                     i, check_state_name[c->state])); 
     
    982874 
    983875 
    984 #if 0 
    985     /* For now, just see if we have a valid pair in component 1 and 
    986      * just terminate ICE. 
    987      */ 
    988     for (i=0; i<ice->valid_cnt; ++i) { 
    989         pj_ice_check *c = &ice->clist.checks[ice->valid_list[i]]; 
    990         if (c->lcand->comp_id == 1) 
    991             break; 
    992     } 
    993  
    994     if (i != ice->valid_cnt) { 
    995         /* ICE succeeded */ 
    996         on_ice_complete(ice, PJ_SUCCESS); 
    997         return PJ_TRUE; 
    998     } 
    999 #else 
    1000876    /* See if all components have nominated pair. If they do, then mark 
    1001877     * ICE processing as success, otherwise wait. 
     
    1010886        return PJ_TRUE; 
    1011887    } 
    1012 #endif 
    1013888 
    1014889    /*  
     
    1025900    if (i == ice->clist.count) { 
    1026901        /* All checks have completed */ 
    1027         on_ice_complete(ice, -1); 
     902        on_ice_complete(ice, PJNATH_EICEFAILED); 
    1028903        return PJ_TRUE; 
    1029904    } 
     
    11671042    comp = find_comp(ice, lcand->comp_id); 
    11681043 
    1169     LOG((ice->obj_name,  
     1044    LOG5((ice->obj_name,  
    11701045         "Sending connectivity check for check %s",  
    11711046         dump_check(buffer, sizeof(buffer), ice, check))); 
     
    12391114    clist_set_state(ice, clist, PJ_ICE_CHECKLIST_ST_RUNNING); 
    12401115 
    1241     LOG((ice->obj_name, "Starting checklist periodic check")); 
     1116    LOG5((ice->obj_name, "Starting checklist periodic check")); 
    12421117 
    12431118    /* Send STUN Binding request for check with highest priority on 
     
    13071182 
    13081183    PJ_ASSERT_RETURN(ice, PJ_EINVAL); 
    1309  
    1310     LOG((ice->obj_name, "Starting ICE check..")); 
     1184    /* Checklist must be created */ 
     1185    PJ_ASSERT_RETURN(ice->clist.count > 0, PJ_EINVALIDOP); 
     1186 
     1187    LOG4((ice->obj_name, "Starting ICE check..")); 
    13111188 
    13121189    clist = &ice->clist; 
    1313  
    1314     if (clist->count == 0) 
    1315         return PJ_EICENOCHECKLIST; 
    13161190 
    13171191    /* Pickup the first pair and set the state to Waiting */ 
     
    13631237    struct req_data *rd = (struct req_data*) tdata->user_data; 
    13641238    pj_ice *ice; 
    1365     pj_ice_check *check; 
    1366     const pj_ice_cand *lcand; 
    1367     const pj_ice_cand *rcand; 
     1239    pj_ice_check *check, *new_check; 
     1240    pj_ice_cand *lcand; 
    13681241    pj_ice_checklist *clist; 
    13691242    pj_stun_xor_mapped_addr_attr *xaddr; 
     
    13791252    pj_mutex_lock(ice->mutex); 
    13801253 
    1381     lcand = check->lcand; 
    1382     rcand = check->rcand; 
    1383  
    1384     LOG((ice->obj_name,  
     1254    /* Init lcand to NULL. lcand will be found from the mapped address 
     1255     * found in the response. 
     1256     */ 
     1257    lcand = NULL; 
     1258 
     1259    LOG4((ice->obj_name,  
    13851260         "Check %s%s: connectivity check %s", 
    13861261         dump_check(buffer, sizeof(buffer), ice, check), 
     
    14031278    PJ_TODO(ICE_CHECK_RESPONSE_SOURCE_ADDRESS); 
    14041279 
    1405     /* Get the STUN MAPPED-ADDRESS attribute. */ 
     1280    /* Get the STUN XOR-MAPPED-ADDRESS attribute. */ 
    14061281    xaddr = (pj_stun_xor_mapped_addr_attr*) 
    14071282            pj_stun_msg_find_attr(response, PJ_STUN_ATTR_XOR_MAPPED_ADDR,0); 
    14081283    if (!xaddr) { 
    14091284        check_set_state(ice, check, PJ_ICE_CHECK_STATE_FAILED,  
    1410                         PJNATH_ESTUNNOXORMAP); 
     1285                        PJNATH_ESTUNNOMAPPEDADDR); 
    14111286        on_check_complete(ice, check); 
    14121287        pj_mutex_unlock(ice->mutex); 
     
    14141289    } 
    14151290 
     1291    /* Find local candidate that matches the XOR-MAPPED-ADDRESS */ 
     1292    pj_assert(lcand == NULL); 
     1293    for (i=0; i<ice->lcand_cnt; ++i) { 
     1294        if (sockaddr_cmp(&xaddr->sockaddr, &ice->lcand[i].addr) == 0) { 
     1295            /* Match */ 
     1296            lcand = &ice->lcand[i]; 
     1297            break; 
     1298        } 
     1299    } 
     1300 
    14161301    /* If the transport address returned in XOR-MAPPED-ADDRESS does not match 
    14171302     * any of the local candidates that the agent knows about, the mapped  
    14181303     * address represents a new candidate - a peer reflexive candidate. 
    14191304     */ 
    1420     for (i=0; i<ice->lcand_cnt; ++i) { 
    1421         if (sockaddr_cmp(&xaddr->sockaddr, &ice->lcand[i].addr) == 0) { 
    1422             /* Match */ 
    1423             break; 
    1424         } 
    1425     } 
    1426  
    1427     if (i == ice->lcand_cnt) { 
     1305    if (lcand == NULL) { 
    14281306        unsigned cand_id; 
    14291307        char buf[32]; 
     
    14511329    } 
    14521330 
    1453     /* Sets the state of the pair that generated the check to succeeded. */ 
     1331    /* Add pair to valid list */ 
     1332    new_check = &ice->valid_list.checks[ice->valid_list.count++]; 
     1333    new_check->lcand = lcand; 
     1334    new_check->rcand = check->rcand; 
     1335    new_check->prio = CALC_CHECK_PRIO(ice, lcand, check->rcand); 
     1336    new_check->state = PJ_ICE_CHECK_STATE_SUCCEEDED; 
     1337    new_check->nominated = check->nominated; 
     1338    new_check->err_code = PJ_SUCCESS; 
     1339 
     1340    /* Sort valid_list */ 
     1341    sort_checklist(&ice->valid_list); 
     1342 
     1343 
     1344    /* Sets the state of the original pair that generated the check to  
     1345     * succeeded.  
     1346     */ 
    14541347    check_set_state(ice, check, PJ_ICE_CHECK_STATE_SUCCEEDED, PJ_SUCCESS); 
    1455  
    1456     /* This is a valid pair, so add this to the valid list */ 
    1457     ice->valid_list[ice->valid_cnt++] = rd->ckid; 
    1458  
    1459     /* Sort valid_list */ 
    1460     sort_valid_list(ice); 
    14611348 
    14621349    /* Inform about check completion. 
     
    15161403} 
    15171404 
    1518  
     1405/* This callback is called by the STUN session associated with a candidate 
     1406 * when it receives incoming request. 
     1407 */ 
    15191408static pj_status_t on_stun_rx_request(pj_stun_session *sess, 
    15201409                                      const pj_uint8_t *pkt, 
     
    15411430    /* Reject any requests except Binding request */ 
    15421431    if (msg->hdr.type != PJ_STUN_BINDING_REQUEST) { 
    1543         pj_str_t err_msg = pj_str("Expecting Binding Request only"); 
    15441432        status = pj_stun_session_create_response(sess, msg,  
    15451433                                                 PJ_STUN_SC_BAD_REQUEST, 
    1546                                                  &err_msg, &tdata); 
    1547         if (status != PJ_SUCCESS) { 
     1434                                                 NULL, &tdata); 
     1435        if (status != PJ_SUCCESS) 
    15481436            return status; 
    1549         } 
    1550  
    1551         status = pj_stun_session_send_msg(sess, PJ_TRUE,  
    1552                                           src_addr, src_addr_len, tdata); 
    1553  
    1554         return status; 
     1437 
     1438        return pj_stun_session_send_msg(sess, PJ_TRUE,  
     1439                                        src_addr, src_addr_len, tdata); 
    15551440    } 
    15561441 
     
    15671452         pj_stun_msg_find_attr(msg, PJ_STUN_ATTR_PRIORITY, 0); 
    15681453    if (ap == 0) { 
    1569         LOG((ice->obj_name, "Received Binding request with no PRIORITY")); 
     1454        LOG5((ice->obj_name, "Received Binding request with no PRIORITY")); 
    15701455        pj_mutex_unlock(ice->mutex); 
    15711456        return PJ_SUCCESS; 
     
    16271512                                                  rcand->foundation.ptr); 
    16281513 
    1629         LOG((ice->obj_name,  
     1514        LOG4((ice->obj_name,  
    16301515             "Added new remote candidate from the request: %s:%d", 
    16311516             pj_inet_ntoa(rcand->addr.ipv4.sin_addr), 
     
    16791564            c->state == PJ_ICE_CHECK_STATE_WAITING) 
    16801565        { 
    1681             LOG((ice->obj_name, "Performing triggered check for check %d",i)); 
     1566            LOG5((ice->obj_name, "Performing triggered check for check %d",i)); 
    16821567            perform_check(ice, &ice->clist, i); 
    16831568 
     
    16861571             * TODO 
    16871572             */ 
    1688             LOG((ice->obj_name, "Triggered check for check %d not performed " 
     1573            LOG5((ice->obj_name, "Triggered check for check %d not performed " 
    16891574                                "because it's in progress", i)); 
    16901575        } else if (c->state == PJ_ICE_CHECK_STATE_SUCCEEDED) { 
     
    16941579            pj_bool_t complete; 
    16951580 
    1696             LOG((ice->obj_name, "Triggered check for check %d not performed " 
     1581            LOG5((ice->obj_name, "Triggered check for check %d not performed " 
    16971582                                "because it's completed", i)); 
    16981583 
     
    17221607        c->err_code = PJ_SUCCESS; 
    17231608 
    1724         LOG((ice->obj_name, "New triggered check added: %d",  
     1609        LOG4((ice->obj_name, "New triggered check added: %d",  
    17251610             ice->clist.count)); 
    17261611        perform_check(ice, &ice->clist, ice->clist.count++); 
    17271612 
    17281613    } else { 
    1729         LOG((ice->obj_name, "Error: unable to perform triggered check: " 
     1614        LOG4((ice->obj_name, "Error: unable to perform triggered check: " 
    17301615             "TOO MANY CHECKS IN CHECKLIST!")); 
    17311616    } 
     
    17721657    comp = find_comp(ice, comp_id); 
    17731658    if (comp == NULL) { 
    1774         status = PJ_EICEINCOMPID; 
     1659        status = PJNATH_EICEINCOMPID; 
    17751660        goto on_return; 
    17761661    } 
    17771662 
    17781663    if (comp->nominated_check_id == -1) { 
    1779         status = PJ_EICEINPROGRESS; 
     1664        status = PJNATH_EICEINPROGRESS; 
    17801665        goto on_return; 
    17811666    } 
     
    18131698    comp = find_comp(ice, comp_id); 
    18141699    if (comp == NULL) { 
    1815         status = PJ_EICEINCOMPID; 
     1700        status = PJNATH_EICEINCOMPID; 
    18161701        goto on_return; 
    18171702    } 
Note: See TracChangeset for help on using the changeset viewer.