Ignore:
Timestamp:
Oct 29, 2006 6:13:13 PM (18 years ago)
Author:
bennylp
Message:

Another Symbian commit, ported all PJSIP libraries and sipstateless runs without crashes (still no SIP message though)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/symbian/pjsip-apps/src/samples/sipstateless.c

    r448 r789  
    3232#include <pjlib-util.h> 
    3333#include <pjlib.h> 
     34#include "../../../pjlib/src/pj/os_symbian.h" 
    3435 
    3536 
     
    6263 
    6364 
     65extern "C" 
     66{ 
     67        int pj_app_main(int argc, char *argv[]); 
     68} 
     69 
     70 
     71static void app_perror(pj_status_t status) 
     72{ 
     73    char errmsg[PJ_ERR_MSG_SIZE]; 
     74    pj_strerror(status, errmsg, sizeof(errmsg)); 
     75    PJ_LOG(1,("main", "Error: %s", errmsg)); 
     76} 
     77 
     78 
    6479/* 
    65  * main() 
     80 * pj_app_main() 
    6681 * 
    6782 */ 
    68 int main() 
     83int pj_app_main(int argc, char *argv[]) 
    6984{ 
    7085    pj_caching_pool cp; 
     
    93108    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1); 
    94109 
    95  
    96110    /* Then init PJLIB-UTIL: */ 
    97111    status = pjlib_util_init(); 
     
    99113 
    100114    /* Must create a pool factory before we can allocate any memory. */ 
    101     pj_caching_pool_init(&cp, &pj_pool_factory_default_policy, 0); 
     115    pj_caching_pool_init(&cp, pj_pool_factory_get_default_policy(), 0); 
    102116 
    103117 
     
    135149        status = pjsip_udp_transport_start( sip_endpt, &addr, NULL, 1, NULL); 
    136150        if (status != PJ_SUCCESS) { 
     151            char errmsg[PJ_ERR_MSG_SIZE]; 
     152 
     153            pj_strerror(status, errmsg, sizeof(errmsg)); 
    137154            PJ_LOG(3,(THIS_FILE,  
    138                       "Error starting UDP transport (port in use?)")); 
     155                      "Error starting UDP transport: %s", errmsg)); 
    139156            return 1; 
    140157        } 
Note: See TracChangeset for help on using the changeset viewer.