Apache Server configuration support - apr_pstrcat use in my own module

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > December 2007 > apr_pstrcat use in my own module





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author apr_pstrcat use in my own module
julien.ponteville@gmail.com

2007-12-14, 7:43 am

Hi,

Is it possible to write this (last line, dual use of new_cookie) :
char *cookiebuf = NULL;
char *new_cookie = NULL;
/* ... */
new_cookie = apr_psprintf(r->pool, "%s=%s; path=/", cookie_name,
cookiebuf);
/* ... */
new_cookie = apr_pstrcat(r->pool, new_cookie, "; domain=", domain,
NULL);

Or should I write this :
char *new_cookie2 = NULL;
char *cookiebuf = NULL;
char *new_cookie = NULL;
/* ... */
new_cookie = apr_psprintf(r->pool, "%s=%s; path=/", cookie_name,
cookiebuf);
/* ... */
new_cookie2 = apr_pstrcat(r->pool, new_cookie, "; domain=", domain,
NULL);

Regards,
Younger69.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com