FW: how to resize with pjlib?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry, sent to the wrong address.

From: nigelcz@xxxxxxxxxxx
To: pjsip at pjsip.org
Subject: how to resize with pjlib?
Date: Thu, 27 Mar 2008 12:23:26 +0000








Hi list,

I've got a few questions - 

1. What is the pjlib equivalent to a realloc()?
2. Can i do this - 
    
    char str1[32] = {"123456"}; 
    char str2[32] ={"123456789012345"};
    char str3[32] ={"1234"};
    char str4[32] ={"1234678"};

    pj_str_t  pj_string;
    
    //1st call
    pj_strdup2_with_null(pool, &pj_string, str1); // no problem here
    
    //2nd call 
    if(pj_string.slen > strlen(str2))
         pj_strcpy2(&pj_string, str2);    //no problem here too
    else
        pj_strdup2_with_null(pool, &pj_string, str2); // ok to call pj_strdup2 again? 

   //3rd call with str3 ...
    
   //4th call with str4 
   // cannot use pj_string.slen to decide whether to pj_strcpy or pj_strdup, right?
        
    Please help!

thanks,
Nigel
    

Connect to the next generation of MSN Messenger   Get it now! 

_________________________________________________________________
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080327/581be6f1/attachment.html 


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux