Changeset 956 for pjproject


Ignore:
Timestamp:
Feb 17, 2007 12:12:15 AM (18 years ago)
Author:
bennylp
Message:

sipstateless now takes an argument for the response code to be sent

File:
1 edited

Legend:

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

    r531 r956  
    4545static pjsip_endpoint *sip_endpt; 
    4646 
     47/* What response code to be sent (default is 501/Not Implemented) */ 
     48static int code = PJSIP_SC_NOT_IMPLEMENTED; 
     49 
    4750 
    4851/* Callback to handle incoming requests. */ 
     
    5457    if (rdata->msg_info.msg->line.req.method.id != PJSIP_ACK_METHOD) { 
    5558        pjsip_endpt_respond_stateless( sip_endpt, rdata,  
    56                                        PJSIP_SC_NOT_IMPLEMENTED, NULL, 
     59                                       code, NULL, 
    5760                                       NULL, NULL); 
    5861    } 
     
    6669 * 
    6770 */ 
    68 int main() 
     71int main(int argc, char *argv[]) 
    6972{ 
    7073    pj_caching_pool cp; 
     
    8992    pj_status_t status; 
    9093     
     94    if (argc == 2) 
     95        code = atoi(argv[1]); 
     96 
    9197    /* Must init PJLIB first: */ 
    9298    status = pj_init(); 
Note: See TracChangeset for help on using the changeset viewer.