Re: cvs commit: httpd-2.0/modules/experimental util_ldap.c util_ldap_cache.c util_ldap_cache.h
[EMAIL PROTECTED] wrote: +#if APR_HAS_SHARED_MEMORY +/* If the cache file already exists then delete it. Otherwise we are + * going to run into problems creating the shared memory. */ +apr_file_remove(st-cache_file, ptemp); +if (st-cache_file) { +char *lck_file = apr_pstrcat (st-pool, st-cache_file, .lck, NULL); +apr_file_remove(lck_file, ptemp); +} +#endif Does this patch support the idea of the cache file being NULL (ie anonymous shared memory?). The previous code insisted on specifying a cache file, which didn't work properly under Linux. Now, not specifying a cache filename means use anonymous shared memory, I'd just like to check that this NULL filename is case is still handled properly. Regards, Graham --
Re: cvs commit: httpd-2.0/modules/experimental util_ldap.c util_ldap_cache.c util_ldap_cache.h
No, I didn't change anything that would allow for anonymous shared memory. This should probably check for a NULL before calling apr_file_remove(). Brad Brad Nicholes Senior Software Engineer Novell, Inc., the leading provider of Net business solutions http://www.novell.com [EMAIL PROTECTED] Saturday, June 26, 2004 9:30:42 AM [EMAIL PROTECTED] wrote: +#if APR_HAS_SHARED_MEMORY +/* If the cache file already exists then delete it. Otherwise we are + * going to run into problems creating the shared memory. */ +apr_file_remove(st-cache_file, ptemp); +if (st-cache_file) { +char *lck_file = apr_pstrcat (st-pool, st-cache_file, .lck, NULL); +apr_file_remove(lck_file, ptemp); +} +#endif Does this patch support the idea of the cache file being NULL (ie anonymous shared memory?). The previous code insisted on specifying a cache file, which didn't work properly under Linux. Now, not specifying a cache filename means use anonymous shared memory, I'd just like to check that this NULL filename is case is still handled properly. Regards, Graham --
Re: cvs commit: httpd-2.0/modules/experimental util_ldap.c util_ldap_cache.c util_ldap_cache.h
Brad Nicholes wrote: No, I didn't change anything that would allow for anonymous shared memory. This should probably check for a NULL before calling apr_file_remove(). +apr_file_remove(st-cache_file, ptemp); Will this line segfault if ptempt is NULL? If not, then it should be fine. If so, we should probably test for NULLness first (as you recommend above). Regards, Graham --
Re: cvs commit: httpd-2.0/modules/experimental util_ldap.c util_ldap_cache.c util_ldap_cache.h
ptemp shouldn't ever be NULL on a post_config, right? I just fixed the code so that it checks for a NULL file name before calling apr_file_remove(). Brad Brad Nicholes Senior Software Engineer Novell, Inc., the leading provider of Net business solutions http://www.novell.com [EMAIL PROTECTED] Saturday, June 26, 2004 10:01:07 AM Brad Nicholes wrote: No, I didn't change anything that would allow for anonymous shared memory. This should probably check for a NULL before calling apr_file_remove(). +apr_file_remove(st-cache_file, ptemp); Will this line segfault if ptempt is NULL? If not, then it should be fine. If so, we should probably test for NULLness first (as you recommend above). Regards, Graham --