Changeset 1239


Ignore:
Timestamp:
May 1, 2007 12:25:01 PM (17 years ago)
Author:
bennylp
Message:

Ported PJLIB-UTIL and PJNATH to Symbian

Location:
pjproject/trunk
Files:
3 added
10 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib-util/src/pjlib-util/dns.c

    r1031 r1239  
    6767 
    6868    /* Initialize header */ 
    69     hdr = packet; 
     69    hdr = (pj_dns_hdr*) packet; 
    7070    pj_bzero(hdr, sizeof(struct pj_dns_hdr)); 
    7171    hdr->id = pj_htons(id); 
     
    111111 * it may contain pointers when name compression is applied)  
    112112 */ 
    113 static pj_status_t get_name_len(int rec_counter, const char *pkt,  
    114                                 const char *start, const char *max,  
     113static pj_status_t get_name_len(int rec_counter, const pj_uint8_t *pkt,  
     114                                const pj_uint8_t *start, const pj_uint8_t *max, 
    115115                                int *parsed_len, int *name_len) 
    116116{ 
    117     const char *p; 
     117    const pj_uint8_t *p; 
    118118    pj_status_t status; 
    119119 
     
    181181 * it may contain pointers when compression is applied). 
    182182 */ 
    183 static pj_status_t get_name(int rec_counter, const char *pkt,  
    184                             const char *start, const char *max, 
     183static pj_status_t get_name(int rec_counter, const pj_uint8_t *pkt,  
     184                            const pj_uint8_t *start, const pj_uint8_t *max, 
    185185                            pj_str_t *name) 
    186186{ 
    187     const char *p; 
     187    const pj_uint8_t *p; 
    188188    pj_status_t status; 
    189189 
     
    242242/* Skip query records. */ 
    243243static pj_status_t parse_query(pj_dns_parsed_query *q, pj_pool_t *pool, 
    244                                const char *pkt, const char *start,  
    245                                const char *max, int *parsed_len) 
    246 { 
    247     const char *p = start; 
     244                               const pj_uint8_t *pkt, const pj_uint8_t *start, 
     245                               const pj_uint8_t *max, int *parsed_len) 
     246{ 
     247    const pj_uint8_t *p = start; 
    248248    int name_len, name_part_len; 
    249249    pj_status_t status; 
     
    255255 
    256256    /* Allocate memory for the name */ 
    257     q->name.ptr = pj_pool_alloc(pool, name_len+4); 
     257    q->name.ptr = (char*) pj_pool_alloc(pool, name_len+4); 
    258258    q->name.slen = 0; 
    259259 
     
    283283/* Parse RR records */ 
    284284static pj_status_t parse_rr(pj_dns_parsed_rr *rr, pj_pool_t *pool, 
    285                             const char *pkt, 
    286                             const char *start, const char *max,  
     285                            const pj_uint8_t *pkt, 
     286                            const pj_uint8_t *start, const pj_uint8_t *max, 
    287287                            int *parsed_len) 
    288288{ 
    289     const char *p = start; 
     289    const pj_uint8_t *p = start; 
    290290    int name_len, name_part_len; 
    291291    pj_status_t status; 
     
    297297 
    298298    /* Allocate memory for the name */ 
    299     rr->name.ptr = pj_pool_alloc(pool, name_len+4); 
     299    rr->name.ptr = (char*) pj_pool_alloc(pool, name_len+4); 
    300300    rr->name.slen = 0; 
    301301 
     
    355355 
    356356        /* Allocate memory for the name */ 
    357         rr->rdata.cname.name.ptr = pj_pool_alloc(pool, name_len); 
     357        rr->rdata.cname.name.ptr = (char*) pj_pool_alloc(pool, name_len); 
    358358        rr->rdata.cname.name.slen = 0; 
    359359 
     
    388388 
    389389        /* Allocate memory for the name */ 
    390         rr->rdata.srv.target.ptr = pj_pool_alloc(pool, name_len); 
     390        rr->rdata.srv.target.ptr = (char*) pj_pool_alloc(pool, name_len); 
    391391        rr->rdata.srv.target.slen = 0; 
    392392 
     
    419419{ 
    420420    pj_dns_parsed_packet *res; 
    421     char *start, *end; 
     421    const pj_uint8_t *start, *end; 
    422422    pj_status_t status; 
    423423    unsigned i; 
     
    431431 
    432432    /* Create the structure */ 
    433     res = pj_pool_zalloc(pool, sizeof(pj_dns_parsed_packet)); 
     433    res = PJ_POOL_ZALLOC_T(pool, pj_dns_parsed_packet); 
    434434 
    435435    /* Copy the DNS header, and convert endianness to host byte order */ 
     
    443443 
    444444    /* Mark start and end of payload */ 
    445     start = ((char*)packet) + sizeof(pj_dns_hdr); 
    446     end = ((char*)packet) + size; 
     445    start = ((const pj_uint8_t*)packet) + sizeof(pj_dns_hdr); 
     446    end = ((const pj_uint8_t*)packet) + size; 
    447447 
    448448    /* Parse query records (if any). 
    449449     */ 
    450450    if (res->hdr.qdcount) { 
    451         res->q = pj_pool_zalloc(pool, res->hdr.qdcount * 
     451        res->q = (pj_dns_parsed_query*) 
     452                 pj_pool_zalloc(pool, res->hdr.qdcount * 
    452453                                      sizeof(pj_dns_parsed_query)); 
    453454        for (i=0; i<res->hdr.qdcount; ++i) { 
    454455            int parsed_len = 0; 
    455456             
    456             status = parse_query(&res->q[i], pool, packet, start, end, 
    457                                 &parsed_len); 
     457            status = parse_query(&res->q[i], pool, (const pj_uint8_t*)packet,  
     458                                 start, end, &parsed_len); 
    458459            if (status != PJ_SUCCESS) 
    459460                return status; 
     
    465466    /* Parse answer, if any */ 
    466467    if (res->hdr.anscount) { 
    467         res->ans = pj_pool_zalloc(pool, res->hdr.anscount *  
     468        res->ans = (pj_dns_parsed_rr*) 
     469                   pj_pool_zalloc(pool, res->hdr.anscount *  
    468470                                        sizeof(pj_dns_parsed_rr)); 
    469471 
     
    471473            int parsed_len; 
    472474 
    473             status = parse_rr(&res->ans[i], pool, packet, start, end,  
    474                               &parsed_len); 
     475            status = parse_rr(&res->ans[i], pool, (const pj_uint8_t*)packet,  
     476                              start, end, &parsed_len); 
    475477            if (status != PJ_SUCCESS) 
    476478                return status; 
     
    482484    /* Parse authoritative NS records, if any */ 
    483485    if (res->hdr.nscount) { 
    484         res->ns = pj_pool_zalloc(pool, res->hdr.nscount * 
     486        res->ns = (pj_dns_parsed_rr*) 
     487                  pj_pool_zalloc(pool, res->hdr.nscount * 
    485488                                       sizeof(pj_dns_parsed_rr)); 
    486489 
     
    488491            int parsed_len; 
    489492 
    490             status = parse_rr(&res->ns[i], pool, packet, start, end,  
    491                               &parsed_len); 
     493            status = parse_rr(&res->ns[i], pool, (const pj_uint8_t*)packet,  
     494                              start, end, &parsed_len); 
    492495            if (status != PJ_SUCCESS) 
    493496                return status; 
     
    499502    /* Parse additional RR answer, if any */ 
    500503    if (res->hdr.arcount) { 
    501         res->arr = pj_pool_zalloc(pool, res->hdr.arcount * 
     504        res->arr = (pj_dns_parsed_rr*) 
     505                   pj_pool_zalloc(pool, res->hdr.arcount * 
    502506                                        sizeof(pj_dns_parsed_rr)); 
    503507 
     
    505509            int parsed_len; 
    506510 
    507             status = parse_rr(&res->arr[i], pool, packet, start, end,  
    508                               &parsed_len); 
     511            status = parse_rr(&res->arr[i], pool, (const pj_uint8_t*)packet,  
     512                              start, end, &parsed_len); 
    509513            if (status != PJ_SUCCESS) 
    510514                return status; 
     
    614618 
    615619    /* Create packet and copy header */ 
    616     *p_dst = dst = pj_pool_zalloc(pool, sizeof(pj_dns_parsed_packet)); 
     620    *p_dst = dst = PJ_POOL_ZALLOC_T(pool, pj_dns_parsed_packet); 
    617621    pj_memcpy(&dst->hdr, &p->hdr, sizeof(p->hdr)); 
    618622 
     
    629633    /* Copy query section */ 
    630634    if (p->hdr.qdcount && (options & PJ_DNS_NO_QD)==0) { 
    631         dst->q = pj_pool_alloc(pool, p->hdr.qdcount *  
     635        dst->q = (pj_dns_parsed_query*) 
     636                 pj_pool_alloc(pool, p->hdr.qdcount *  
    632637                                     sizeof(pj_dns_parsed_query)); 
    633638        for (i=0; i<p->hdr.qdcount; ++i) { 
     
    640645    /* Copy answer section */ 
    641646    if (p->hdr.anscount && (options & PJ_DNS_NO_ANS)==0) { 
    642         dst->ans = pj_pool_alloc(pool, p->hdr.anscount *  
     647        dst->ans = (pj_dns_parsed_rr*) 
     648                   pj_pool_alloc(pool, p->hdr.anscount *  
    643649                                       sizeof(pj_dns_parsed_rr)); 
    644650        for (i=0; i<p->hdr.anscount; ++i) { 
     
    651657    /* Copy NS section */ 
    652658    if (p->hdr.nscount && (options & PJ_DNS_NO_NS)==0) { 
    653         dst->ns = pj_pool_alloc(pool, p->hdr.nscount *  
     659        dst->ns = (pj_dns_parsed_rr*) 
     660                  pj_pool_alloc(pool, p->hdr.nscount *  
    654661                                      sizeof(pj_dns_parsed_rr)); 
    655662        for (i=0; i<p->hdr.nscount; ++i) { 
     
    662669    /* Copy additional info section */ 
    663670    if (p->hdr.arcount && (options & PJ_DNS_NO_AR)==0) { 
    664         dst->arr = pj_pool_alloc(pool, p->hdr.arcount *  
     671        dst->arr = (pj_dns_parsed_rr*) 
     672                   pj_pool_alloc(pool, p->hdr.arcount *  
    665673                                       sizeof(pj_dns_parsed_rr)); 
    666674        for (i=0; i<p->hdr.arcount; ++i) { 
  • pjproject/trunk/pjlib-util/src/pjlib-util/resolver.c

    r1031 r1239  
    244244 
    245245    /* Create pool and name */ 
    246     resv = pj_pool_zalloc(pool, sizeof(struct pj_dns_resolver)); 
     246    resv = PJ_POOL_ZALLOC_T(pool, struct pj_dns_resolver); 
    247247    resv->pool = pool; 
    248248    resv->udp_sock = PJ_INVALID_SOCKET; 
     
    338338        it = pj_hash_first(resolver->hquerybyid, &it_buf); 
    339339        while (it) { 
    340             pj_dns_async_query *q = pj_hash_this(resolver->hquerybyid, it); 
     340            pj_dns_async_query *q = (pj_dns_async_query *) 
     341                                    pj_hash_this(resolver->hquerybyid, it); 
    341342            pj_dns_async_query *cq; 
    342343            if (q->cb) 
     
    498499        pj_bzero(q, sizeof(*q)); 
    499500    } else { 
    500         q = pj_pool_zalloc(resolver->pool, sizeof(*q)); 
     501        q = PJ_POOL_ZALLOC_T(resolver->pool, pj_dns_async_query); 
    501502    } 
    502503 
     
    658659     */ 
    659660    hval = 0; 
    660     cache = pj_hash_get(resolver->hrescache, &key, sizeof(key), &hval); 
     661    cache = (struct cached_res *) pj_hash_get(resolver->hrescache, &key,  
     662                                              sizeof(key), &hval); 
    661663    if (cache) { 
    662664        /* We've found a cached entry. */ 
     
    703705 
    704706    /* Next, check if we have pending query on the same resource */ 
    705     q = pj_hash_get(resolver->hquerybyres, &key, sizeof(key), NULL); 
     707    q = (pj_dns_async_query *) pj_hash_get(resolver->hquerybyres, &key,  
     708                                           sizeof(key), NULL); 
    706709    if (q) { 
    707710        /* Yes, there's another pending query to the same key. 
     
    942945    /* If status is unsuccessful, clear the same entry from the cache */ 
    943946    if (status != PJ_SUCCESS) { 
    944         cache = pj_hash_get(resolver->hrescache, key, sizeof(*key), &hval); 
     947        cache = (struct cached_res *) pj_hash_get(resolver->hrescache, key,  
     948                                                  sizeof(*key), &hval); 
    945949        if (cache) 
    946950            pj_list_push_back(&resolver->res_free_nodes, cache); 
     
    977981    /* If TTL is zero, clear the same entry in the hash table */ 
    978982    if (ttl == 0) { 
    979         cache = pj_hash_get(resolver->hrescache, key, sizeof(*key), &hval); 
     983        cache = (struct cached_res *) pj_hash_get(resolver->hrescache, key,  
     984                                                  sizeof(*key), &hval); 
    980985        if (cache) 
    981986            pj_list_push_back(&resolver->res_free_nodes, cache); 
     
    985990 
    986991    /* Get a cache response entry */ 
    987     cache = pj_hash_get(resolver->hrescache, key, sizeof(*key), &hval); 
     992    cache = (struct cached_res *) pj_hash_get(resolver->hrescache, key,  
     993                                              sizeof(*key), &hval); 
    988994    if (cache == NULL) { 
    989995        if (!pj_list_empty(&resolver->res_free_nodes)) { 
     
    991997            pj_list_erase(cache); 
    992998        } else { 
    993             cache = pj_pool_zalloc(resolver->pool, sizeof(*cache)); 
     999            cache = PJ_POOL_ZALLOC_T(resolver->pool, struct cached_res); 
    9941000        } 
    9951001    } 
     
    10411047    PJ_UNUSED_ARG(timer_heap); 
    10421048 
    1043     q = entry->user_data; 
     1049    q = (pj_dns_async_query *) entry->user_data; 
    10441050    resolver = q->resolver; 
    10451051 
     
    11251131 
    11261132 
    1127     resolver = pj_ioqueue_get_user_data(key); 
     1133    resolver = (pj_dns_resolver *) pj_ioqueue_get_user_data(key); 
    11281134    pj_mutex_lock(resolver->mutex); 
    11291135 
     
    11881194 
    11891195    /* Find the query based on the transaction ID */ 
    1190     q = pj_hash_get(resolver->hquerybyid, &dns_pkt->hdr.id,  
     1196    q = (pj_dns_async_query*)  
     1197        pj_hash_get(resolver->hquerybyid, &dns_pkt->hdr.id, 
    11911198                    sizeof(dns_pkt->hdr.id), NULL); 
    11921199    if (!q) { 
     
    13721379        it = pj_hash_first(resolver->hrescache, &itbuf); 
    13731380        while (it) { 
    1374             struct cached_res *cache = pj_hash_this(resolver->hrescache, it); 
     1381            struct cached_res *cache; 
     1382            cache = (struct cached_res*)pj_hash_this(resolver->hrescache, it); 
    13751383            PJ_LOG(3,(resolver->name.ptr,  
    13761384                      "   Type %s: %s", 
     
    13901398        while (it) { 
    13911399            struct pj_dns_async_query *q; 
    1392             q = pj_hash_this(resolver->hquerybyid, it); 
     1400            q = (pj_dns_async_query*) pj_hash_this(resolver->hquerybyid, it); 
    13931401            PJ_LOG(3,(resolver->name.ptr,  
    13941402                      "   Type %s: %s", 
  • pjproject/trunk/pjlib-util/src/pjlib-util/srv_resolver.c

    r1113 r1239  
    382382                         pj_dns_parsed_packet *pkt) 
    383383{ 
    384     pj_dns_srv_resolver_job *query_job = user_data; 
     384    pj_dns_srv_resolver_job *query_job = (pj_dns_srv_resolver_job*) user_data; 
    385385    unsigned i; 
    386386 
  • pjproject/trunk/pjlib-util/src/pjlib-util/string.c

    r974 r1239  
    3232        return *src_str; 
    3333 
    34     dst = dst_str.ptr = pj_pool_alloc(pool, src_str->slen); 
     34    dst = dst_str.ptr = (char*) pj_pool_alloc(pool, src_str->slen); 
    3535 
    3636    while (src != end) { 
  • pjproject/trunk/pjlib-util/src/pjlib-util/stun_simple.c

    r992 r1239  
    3636 
    3737 
    38     hdr = pj_pool_calloc(pool, 1, sizeof(pjstun_msg_hdr)); 
     38    hdr = PJ_POOL_ZALLOC_T(pool, pjstun_msg_hdr); 
    3939    if (!hdr) 
    4040        return PJ_ENOMEM; 
  • pjproject/trunk/pjlib-util/src/pjlib-util/stun_simple_client.c

    r992 r1239  
    4242    int i, j, send_cnt = 0; 
    4343    pj_pool_t *pool; 
    44     struct { 
     44    struct query_rec { 
    4545        struct { 
    4646            pj_uint32_t mapped_addr; 
     
    6262 
    6363    /* Allocate client records */ 
    64     rec = pj_pool_calloc(pool, sock_cnt, sizeof(*rec)); 
     64    rec = (struct query_rec*) pj_pool_calloc(pool, sock_cnt, sizeof(*rec)); 
    6565    if (!rec) { 
    6666        status = PJ_ENOMEM; 
     
    9898        for (i=0; i<sock_cnt && status==PJ_SUCCESS; ++i) { 
    9999            for (j=0; j<2 && status==PJ_SUCCESS; ++j) { 
    100                 pjstun_msg_hdr *msg_hdr = out_msg; 
     100                pjstun_msg_hdr *msg_hdr = (pjstun_msg_hdr*) out_msg; 
    101101                pj_ssize_t sent_len; 
    102102 
     
    195195                } 
    196196 
    197                 attr = (void*)pjstun_msg_find_attr(&msg, PJSTUN_ATTR_MAPPED_ADDR); 
     197                attr = (pjstun_mapped_addr_attr*)  
     198                       pjstun_msg_find_attr(&msg, PJSTUN_ATTR_MAPPED_ADDR); 
    198199                if (!attr) { 
    199200                    status = PJLIB_UTIL_ESTUNNOMAP; 
  • pjproject/trunk/pjlib-util/src/pjlib-util/xml.c

    r1145 r1239  
    3838    pj_xml_node *node; 
    3939 
    40     node = pj_pool_zalloc(pool, sizeof(pj_xml_node)); 
     40    node = PJ_POOL_ZALLOC_T(pool, pj_xml_node); 
    4141    pj_list_init( &node->attr_head ); 
    4242    pj_list_init( &node->node_head ); 
     
    4747static pj_xml_attr *alloc_attr( pj_pool_t *pool ) 
    4848{ 
    49     return pj_pool_zalloc(pool, sizeof(pj_xml_attr)); 
     49    return PJ_POOL_ZALLOC_T(pool, pj_xml_attr); 
    5050} 
    5151 
     
    394394                                  pj_bool_t (*match)(pj_xml_node *, const void*)) 
    395395{ 
    396     pj_xml_node *head = (void*)&parent->node_head, *node = head->next; 
     396    pj_xml_node *head = (pj_xml_node*) &parent->node_head, *node = head->next; 
    397397 
    398398    while (node != (void*)head) { 
  • pjproject/trunk/pjnath/src/pjnath/ice_session.c

    r1216 r1239  
    297297 
    298298    if (local_ufrag == NULL) { 
    299         ice->rx_ufrag.ptr = pj_pool_alloc(ice->pool, 16); 
     299        ice->rx_ufrag.ptr = (char*) pj_pool_alloc(ice->pool, 16); 
    300300        pj_create_random_string(ice->rx_ufrag.ptr, 16); 
    301301        ice->rx_ufrag.slen = 16; 
     
    305305 
    306306    if (local_passwd == NULL) { 
    307         ice->rx_pass.ptr = pj_pool_alloc(ice->pool, 16); 
     307        ice->rx_pass.ptr = (char*) pj_pool_alloc(ice->pool, 16); 
    308308        pj_create_random_string(ice->rx_pass.ptr, 16); 
    309309        ice->rx_pass.slen = 16; 
     
    397397{ 
    398398    PJ_ASSERT_RETURN(ice && prefs, PJ_EINVAL); 
    399     ice->prefs = pj_pool_calloc(ice->pool, PJ_ARRAY_SIZE(prefs),  
    400                                 sizeof(pj_uint8_t)); 
     399    ice->prefs = (pj_uint8_t*) pj_pool_calloc(ice->pool, PJ_ARRAY_SIZE(prefs), 
     400                                              sizeof(pj_uint8_t)); 
    401401    pj_memcpy(ice->prefs, prefs, sizeof(prefs)); 
    402402    return PJ_SUCCESS; 
     
    17091709     * Request was sent from. 
    17101710     */ 
    1711     if (sockaddr_cmp(&check->rcand->addr, src_addr) != 0) { 
     1711    if (sockaddr_cmp(&check->rcand->addr, (const pj_sockaddr*)src_addr) != 0) { 
    17121712        status = PJNATH_EICEINSRCADDR; 
    17131713        LOG4((ice->obj_name,  
     
    20642064 
    20652065        /* Foundation is random, unique from other foundation */ 
    2066         rcand->foundation.ptr = pj_pool_alloc(ice->pool, 36); 
     2066        rcand->foundation.ptr = (char*) pj_pool_alloc(ice->pool, 36); 
    20672067        rcand->foundation.slen = pj_ansi_snprintf(rcand->foundation.ptr, 36, 
    20682068                                                  "f%p",  
     
    23032303    } 
    23042304 
    2305     stun_status = pj_stun_msg_check(pkt, pkt_size, PJ_STUN_IS_DATAGRAM); 
     2305    stun_status = pj_stun_msg_check((const pj_uint8_t*)pkt, pkt_size,  
     2306                                    PJ_STUN_IS_DATAGRAM); 
    23062307    if (stun_status == PJ_SUCCESS) { 
    23072308        status = pj_stun_session_on_rx_pkt(comp->stun_sess, pkt, pkt_size, 
  • pjproject/trunk/pjnath/src/pjnath/stun_msg.c

    r1150 r1239  
    14951495    if (data && length) { 
    14961496        attr->length = length; 
    1497         attr->data = pj_pool_alloc(pool, length); 
     1497        attr->data = (pj_uint8_t*) pj_pool_alloc(pool, length); 
    14981498        pj_memcpy(attr->data, data, length); 
    14991499    } 
     
    15371537    /* Copy the data to the attribute */ 
    15381538    attr->length = attr->hdr.length; 
    1539     attr->data = pj_pool_alloc(pool, attr->length); 
     1539    attr->data = (pj_uint8_t*) pj_pool_alloc(pool, attr->length); 
    15401540    pj_memcpy(attr->data, buf+ATTR_HDR_LEN, attr->length); 
    15411541 
  • pjproject/trunk/pjnath/src/pjnath/stun_session.c

    r1154 r1239  
    381381    sess->use_fingerprint = fingerprint; 
    382382     
    383     sess->srv_name.ptr = pj_pool_alloc(pool, 32); 
     383    sess->srv_name.ptr = (char*) pj_pool_alloc(pool, 32); 
    384384    sess->srv_name.slen = pj_ansi_snprintf(sess->srv_name.ptr, 32, 
    385385                                           "pj_stun-%s", PJ_VERSION); 
     
    454454    if (cred) { 
    455455        if (!sess->cred) 
    456             sess->cred = pj_pool_alloc(sess->pool, sizeof(pj_stun_auth_cred)); 
     456            sess->cred = PJ_POOL_ALLOC_T(sess->pool, pj_stun_auth_cred); 
    457457        pj_stun_auth_cred_dup(sess->pool, sess->cred, cred); 
    458458    } else { 
     
    599599 
    600600    /* Encode message */ 
    601     status = pj_stun_msg_encode(tdata->msg, tdata->pkt, tdata->max_len, 
    602                                 0, get_passwd(sess, tdata->pool, tdata->msg), 
     601    status = pj_stun_msg_encode(tdata->msg, (pj_uint8_t*)tdata->pkt,  
     602                                tdata->max_len, 0,  
     603                                get_passwd(sess, tdata->pool, tdata->msg), 
    603604                                &tdata->pkt_size); 
    604605    if (status != PJ_SUCCESS) { 
     
    753754    /* Alloc packet buffer */ 
    754755    out_max_len = PJ_STUN_MAX_PKT_LEN; 
    755     out_pkt = pj_pool_alloc(pool, out_max_len); 
     756    out_pkt = (pj_uint8_t*) pj_pool_alloc(pool, out_max_len); 
    756757 
    757758    /* Encode */ 
     
    959960    } 
    960961 
    961     dump = pj_pool_alloc(tmp_pool, PJ_STUN_MAX_PKT_LEN); 
     962    dump = (char*) pj_pool_alloc(tmp_pool, PJ_STUN_MAX_PKT_LEN); 
    962963 
    963964    PJ_LOG(5,(SNAME(sess), 
     
    981982     */ 
    982983    if ((options & PJ_STUN_NO_AUTHENTICATE) == 0) { 
    983         status = authenticate_msg(sess, packet, pkt_size, msg, tmp_pool, 
    984                                   src_addr, src_addr_len); 
     984        status = authenticate_msg(sess, (const pj_uint8_t*) packet, pkt_size,  
     985                                  msg, tmp_pool, src_addr, src_addr_len); 
    985986        if (status != PJ_SUCCESS) { 
    986987            goto on_return; 
     
    996997    } else if (PJ_STUN_IS_REQUEST(msg->hdr.type)) { 
    997998 
    998         status = on_incoming_request(sess, tmp_pool, packet, pkt_size, msg, 
    999                                      src_addr, src_addr_len); 
     999        status = on_incoming_request(sess, tmp_pool,  
     1000                                     (const pj_uint8_t*) packet, pkt_size,  
     1001                                     msg, src_addr, src_addr_len); 
    10001002 
    10011003    } else if (PJ_STUN_IS_INDICATION(msg->hdr.type)) { 
    10021004 
    1003         status = on_incoming_indication(sess, tmp_pool, packet, pkt_size, 
     1005        status = on_incoming_indication(sess, tmp_pool,  
     1006                                        (const pj_uint8_t*) packet, pkt_size, 
    10041007                                        msg, src_addr, src_addr_len); 
    10051008 
Note: See TracChangeset for help on using the changeset viewer.