Re: [PATCH] use arrays in smtpd_request_rec

2005-08-16 Thread Rian Hunter
On Aug 15, 2005, at 10:05 PM, Garrett Rooney wrote: Joe Schaefer wrote: Garrett Rooney [EMAIL PROTECTED] writes: Index: smtp_protocol.c === --- smtp_protocol.c(revision 232680) +++ smtp_protocol.c(working copy) [...]

Re: [PATCH] use arrays in smtpd_request_rec (was Re: smtpd_request_rec questions)

2005-08-15 Thread Rian Hunter
On Aug 14, 2005, at 11:08 PM, Garrett Rooney wrote: Rian Hunter wrote: This patch looks good but I have some questions. You seem to use the returned pointers from apr_array_push without checking if they are NULL. Even in apr_array_push, apr_palloc is used without checking for NULL

Re: [PATCH] use arrays in smtpd_request_rec

2005-08-15 Thread Joe Schaefer
Garrett Rooney [EMAIL PROTECTED] writes: Index: smtp_protocol.c === --- smtp_protocol.c (revision 232680) +++ smtp_protocol.c (working copy) [...] +for (i = 0; i sr-extensions-nelts; ++i) { + ap_rprintf(r,

Re: [PATCH] use arrays in smtpd_request_rec

2005-08-15 Thread Garrett Rooney
Joe Schaefer wrote: Garrett Rooney [EMAIL PROTECTED] writes: Index: smtp_protocol.c === --- smtp_protocol.c (revision 232680) +++ smtp_protocol.c (working copy) [...] +for (i = 0; i sr-extensions-nelts; ++i) { +

Re: [PATCH] use arrays in smtpd_request_rec

2005-08-15 Thread Paul Querna
Garrett Rooney wrote: [...] +for (i = 0; i sr-extensions-nelts; ++i) { + ap_rprintf(r, %d-%s\r\n, 250, ((char **)sr-extensions-nelts)[i]); ^ That should be elts, shouldn't it? Yes indeed, it should. One

Re: [PATCH] use arrays in smtpd_request_rec (was Re: smtpd_request_rec questions)

2005-08-14 Thread Rian Hunter
This patch looks good but I have some questions. You seem to use the returned pointers from apr_array_push without checking if they are NULL. Even in apr_array_push, apr_palloc is used without checking for NULL even though apr_palloc can definitely return NULL. Because of that, I'm not

Re: [PATCH] use arrays in smtpd_request_rec (was Re: smtpd_request_rec questions)

2005-08-14 Thread Garrett Rooney
Rian Hunter wrote: This patch looks good but I have some questions. You seem to use the returned pointers from apr_array_push without checking if they are NULL. Even in apr_array_push, apr_palloc is used without checking for NULL even though apr_palloc can definitely return NULL. Because