[PHP-CVS] cvs: php4(PHP_4_3) /ext/imap php_imap.c
iliaa Tue Jun 17 10:13:25 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/imap php_imap.c Log: MFH Index: php4/ext/imap/php_imap.c diff -u php4/ext/imap/php_imap.c:1.142.2.17 php4/ext/imap/php_imap.c:1.142.2.18 --- php4/ext/imap/php_imap.c:1.142.2.17 Tue Jun 17 09:59:56 2003 +++ php4/ext/imap/php_imap.cTue Jun 17 10:13:25 2003 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: php_imap.c,v 1.142.2.17 2003/06/17 13:59:56 iliaa Exp $ */ +/* $Id: php_imap.c,v 1.142.2.18 2003/06/17 14:13:25 iliaa Exp $ */ #define IMAP41 @@ -2725,7 +2725,7 @@ rfc822_write_address(address, env-from); add_property_string(myoverview, from, address, 1); } - if (env-to _php_imap_address_size(env-from) MAILTMPLEN) { + if (env-to _php_imap_address_size(env-to) MAILTMPLEN) { env-to-next = NULL; address[0] = '\0'; rfc822_write_address(address, env-to); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/imap php_imap.c
iliaa Mon Jun 16 13:42:04 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/imap php_imap.c Log: MFH: Fixed bug #24150 (crash in imap_fetch_overview() imap_rfc822_write_address()) Index: php4/ext/imap/php_imap.c diff -u php4/ext/imap/php_imap.c:1.142.2.15 php4/ext/imap/php_imap.c:1.142.2.16 --- php4/ext/imap/php_imap.c:1.142.2.15 Fri Jun 13 10:56:23 2003 +++ php4/ext/imap/php_imap.cMon Jun 16 13:42:04 2003 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: php_imap.c,v 1.142.2.15 2003/06/13 14:56:23 iliaa Exp $ */ +/* $Id: php_imap.c,v 1.142.2.16 2003/06/16 17:42:04 iliaa Exp $ */ #define IMAP41 @@ -1955,6 +1955,10 @@ addr-error=NIL; addr-adl=NIL; + if (_php_imap_address_size(addr) = MAILTMPLEN) { + RETURN_FALSE; + } + string[0]='\0'; rfc822_write_address(string, addr); RETVAL_STRING(string, 1); @@ -2715,13 +2719,13 @@ if (env-subject) { add_property_string(myoverview, subject, env-subject, 1); } - if (env-from) { + if (env-from _php_imap_address_size(env-from) = MAILTMPLEN) { env-from-next=NULL; address[0] = '\0'; rfc822_write_address(address, env-from); add_property_string(myoverview, from, address, 1); } - if (env-to) { + if (env-to _php_imap_address_size(env-from) = MAILTMPLEN) { env-to-next = NULL; address[0] = '\0'; rfc822_write_address(address, env-to); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/imap php_imap.c php_imap.h
iliaa Fri Jun 13 10:45:36 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/imap php_imap.c php_imap.h Log: MFH: Fixed bug #24161 (No timeout value for imap functions) Fixed bug #22505 (Allow imap_sort() and imap_search() to specify a charset) Index: php4/ext/imap/php_imap.c diff -u php4/ext/imap/php_imap.c:1.142.2.13 php4/ext/imap/php_imap.c:1.142.2.14 --- php4/ext/imap/php_imap.c:1.142.2.13 Tue Apr 15 20:58:53 2003 +++ php4/ext/imap/php_imap.cFri Jun 13 10:45:36 2003 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: php_imap.c,v 1.142.2.13 2003/04/16 00:58:53 iliaa Exp $ */ +/* $Id: php_imap.c,v 1.142.2.14 2003/06/13 14:45:36 iliaa Exp $ */ #define IMAP41 @@ -38,6 +38,7 @@ #include php_ini.h #include ext/standard/php_string.h #include ext/standard/info.h +#include ext/standard/file.h #ifdef ERROR #undef ERROR @@ -130,6 +131,7 @@ PHP_FE(imap_utf7_encode,NULL) PHP_FE(imap_mime_header_decode, NULL) PHP_FE(imap_thread, NULL) + PHP_FE(imap_timeout, NULL) #if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001) PHP_FE(imap_get_quota, NULL) @@ -336,6 +338,7 @@ * Called via the mail_parameter function in c-client:src/c-client/mail.c * Author DRK */ + void mail_getquota(MAILSTREAM *stream, char *qroot, QUOTALIST *qlist) { zval *t_map; @@ -436,6 +439,17 @@ /* lets allow NIL */ REGISTER_LONG_CONSTANT(NIL, NIL, CONST_PERSISTENT | CONST_CS); + /* set default timeout values */ + mail_parameters(NIL, SET_OPENTIMEOUT, (void *) FG(default_socket_timeout)); + mail_parameters(NIL, SET_READTIMEOUT, (void *) FG(default_socket_timeout)); + mail_parameters(NIL, SET_WRITETIMEOUT, (void *) FG(default_socket_timeout)); + mail_parameters(NIL, SET_CLOSETIMEOUT, (void *) FG(default_socket_timeout)); + + /* timeout constants */ + REGISTER_LONG_CONSTANT(IMAP_OPENTIMEOUT, 1, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT(IMAP_READTIMEOUT, 2, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT(IMAP_WRITETIMEOUT, 3, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT(IMAP_CLOSETIMEOUT, 4, CONST_PERSISTENT | CONST_CS); /* Open Options */ @@ -703,7 +717,7 @@ IMAPG(imap_user) = estrndup(Z_STRVAL_PP(user), Z_STRLEN_PP(user)); IMAPG(imap_password) = estrndup(Z_STRVAL_PP(passwd), Z_STRLEN_PP(passwd)); - + imap_stream = mail_open(NIL, Z_STRVAL_PP(mailbox), flags); if (imap_stream == NIL) { @@ -2359,11 +2373,11 @@ } /* }}} */ -/* {{{ proto array imap_sort(resource stream_id, int criteria, int reverse [, int options [, string search_criteria]]) +/* {{{ proto array imap_sort(resource stream_id, int criteria, int reverse [, int options [, string search_criteria [, string charset]]]) Sort an array of message headers, optionally including only messages that meet specified criteria. */ PHP_FUNCTION(imap_sort) { - zval **streamind, **pgm, **rev, **flags, **criteria; + zval **streamind, **pgm, **rev, **flags, **criteria, **charset; pils *imap_le_struct; unsigned long *slst, *sl; char *search_criteria; @@ -2371,7 +2385,7 @@ SEARCHPGM *spg=NIL; int myargc = ZEND_NUM_ARGS(); - if (myargc 3 || myargc 5 || zend_get_parameters_ex(myargc, streamind, pgm, rev, flags, criteria) == FAILURE) { + if (myargc 3 || myargc 6 || zend_get_parameters_ex(myargc, streamind, pgm, rev, flags, criteria, charset) == FAILURE) { ZEND_WRONG_PARAM_COUNT(); } @@ -2386,10 +2400,13 @@ if (myargc = 4) { convert_to_long_ex(flags); } - if (myargc == 5) { + if (myargc = 5) { search_criteria = estrndup(Z_STRVAL_PP(criteria), Z_STRLEN_PP(criteria)); spg = mail_criteria(search_criteria); efree(search_criteria); + if (myargc == 6) { + convert_to_string_ex(charset); + } } else { spg = mail_newsearchpgm(); } @@ -2399,7 +2416,7 @@ mypgm-function = (short) Z_LVAL_PP(pgm); mypgm-next = NIL; - slst = mail_sort(imap_le_struct-imap_stream, NIL, spg, mypgm, myargc = 4 ? Z_LVAL_PP(flags) : NIL); + slst = mail_sort(imap_le_struct-imap_stream, (myargc == 6 ? Z_STRVAL_PP(charset) : NIL), spg, mypgm, (myargc = 4 ? Z_LVAL_PP(flags) : NIL)); if (spg) { mail_free_searchpgm(spg); @@ -3351,18
[PHP-CVS] cvs: php4(PHP_4_3) /ext/imap php_imap.c
iliaa Fri Jun 13 10:56:23 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/imap php_imap.c Log: proto Index: php4/ext/imap/php_imap.c diff -u php4/ext/imap/php_imap.c:1.142.2.14 php4/ext/imap/php_imap.c:1.142.2.15 --- php4/ext/imap/php_imap.c:1.142.2.14 Fri Jun 13 10:45:36 2003 +++ php4/ext/imap/php_imap.cFri Jun 13 10:56:23 2003 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: php_imap.c,v 1.142.2.14 2003/06/13 14:45:36 iliaa Exp $ */ +/* $Id: php_imap.c,v 1.142.2.15 2003/06/13 14:56:23 iliaa Exp $ */ #define IMAP41 @@ -3998,6 +3998,8 @@ } /* }}} */ +/* {{{ proto mixed imap_timeout(int timeout_type [, int timeout]) + Set or fetch imap timeout */ PHP_FUNCTION (imap_timeout) { long ttype, timeout=-1; @@ -4053,6 +4055,7 @@ RETURN_FALSE; } } +/* }}} */ /* {{{ Interfaces to C-client */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/imap php_imap.c
moriyoshi Mon Mar 31 15:37:16 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/imap php_imap.c Log: MFH(r-1.161): fixed proto to sync with the documentation Index: php4/ext/imap/php_imap.c diff -u php4/ext/imap/php_imap.c:1.142.2.11 php4/ext/imap/php_imap.c:1.142.2.12 --- php4/ext/imap/php_imap.c:1.142.2.11 Tue Feb 11 17:57:50 2003 +++ php4/ext/imap/php_imap.cMon Mar 31 15:37:15 2003 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: php_imap.c,v 1.142.2.11 2003/02/11 22:57:50 iliaa Exp $ */ +/* $Id: php_imap.c,v 1.142.2.12 2003/03/31 20:37:15 moriyoshi Exp $ */ #define IMAP41 @@ -1993,8 +1993,8 @@ } /* }}} */ -/* {{{ proto string imap_utf8(string string) - Convert a string to UTF-8 */ +/* {{{ proto string imap_utf8(string mime_encoded_text) + Convert a mime-encoded text to UTF-8 */ PHP_FUNCTION(imap_utf8) { zval **str; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/imap php_imap.c
iliaa Tue Feb 11 17:57:50 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/imap php_imap.c Log: MFH Index: php4/ext/imap/php_imap.c diff -u php4/ext/imap/php_imap.c:1.142.2.10 php4/ext/imap/php_imap.c:1.142.2.11 --- php4/ext/imap/php_imap.c:1.142.2.10 Mon Feb 3 16:24:48 2003 +++ php4/ext/imap/php_imap.cTue Feb 11 17:57:50 2003 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: php_imap.c,v 1.142.2.10 2003/02/03 21:24:48 iliaa Exp $ */ +/* $Id: php_imap.c,v 1.142.2.11 2003/02/11 22:57:50 iliaa Exp $ */ #define IMAP41 @@ -3576,6 +3576,34 @@ } /* }}} */ +/* {{{ _php_rfc822_len + * Calculate string length based on imap's rfc822_cat function. + */ +static int _php_rfc822_len(char *str) +{ + int len; + char *p; + + if (!str || !*str) { + return 0; + } + + /* strings with special characters will need to be quoted, as a safety measure +we +* add 2 bytes for the quotes just in case. +*/ + len = strlen(str) + 2; + p = str; + /* rfc822_cat() will escape all and \ characters, therefor we need to +increase +* our buffer length to account for these characters. +*/ + while ((p = strpbrk(p, \\\))) { + p++; + len++; + } + + return len; +} +/* }}} */ /* Support Functions */ /* {{{ _php_imap_get_address_size @@ -3588,10 +3616,10 @@ tmp = addresslist; if (tmp) do { - ret += (tmp-personal) ? strlen(tmp-personal) : 0; - ret += (tmp-adl) ? strlen(tmp-adl) : 0; - ret += (tmp-mailbox) ? strlen(tmp-mailbox) : 0; - ret += (tmp-host) ? strlen(tmp-host) : 0; + ret += _php_rfc822_len(tmp-personal); + ret += _php_rfc822_len(tmp-adl); + ret += _php_rfc822_len(tmp-mailbox); + ret += _php_rfc822_len(tmp-host); num_ent++; } while ((tmp = tmp-next)); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/imap php_imap.c
iliaa Mon Feb 3 16:24:48 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/imap php_imap.c Log: MFH Index: php4/ext/imap/php_imap.c diff -u php4/ext/imap/php_imap.c:1.142.2.9 php4/ext/imap/php_imap.c:1.142.2.10 --- php4/ext/imap/php_imap.c:1.142.2.9 Fri Jan 24 12:10:40 2003 +++ php4/ext/imap/php_imap.cMon Feb 3 16:24:48 2003 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: php_imap.c,v 1.142.2.9 2003/01/24 17:10:40 iliaa Exp $ */ +/* $Id: php_imap.c,v 1.142.2.10 2003/02/03 21:24:48 iliaa Exp $ */ #define IMAP41 @@ -2829,7 +2829,10 @@ } zend_hash_internal_pointer_reset(Z_ARRVAL_PP(body)); - zend_hash_get_current_data(Z_ARRVAL_PP(body), (void **) data); + if (zend_hash_get_current_data(Z_ARRVAL_PP(body), (void **) data) != SUCCESS) +{ + php_error_docref(NULL TSRMLS_CC, E_WARNING, body parameter cannot be +empty); + RETURN_FALSE; + } zend_hash_get_current_key(Z_ARRVAL_PP(body), key, ind, 0); /* FIXME: is this necessary? we're not using key/ind */ if (Z_TYPE_PP(data) == IS_ARRAY) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/imap php_imap.c
sniper Fri Jan 24 05:13:17 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/imap php_imap.c Log: MFH: typofix Index: php4/ext/imap/php_imap.c diff -u php4/ext/imap/php_imap.c:1.142.2.7 php4/ext/imap/php_imap.c:1.142.2.8 --- php4/ext/imap/php_imap.c:1.142.2.7 Thu Jan 23 11:30:07 2003 +++ php4/ext/imap/php_imap.cFri Jan 24 05:13:16 2003 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: php_imap.c,v 1.142.2.7 2003/01/23 16:30:07 sniper Exp $ */ +/* $Id: php_imap.c,v 1.142.2.8 2003/01/24 10:13:16 sniper Exp $ */ #define IMAP41 @@ -420,7 +420,7 @@ #ifndef PHP_WIN32 auth_link(auth_log); /* link in the log authenticator */ auth_link(auth_md5); /* link in the cram-md5 authenticator */ -#ifdef HAVE_IMAP_KRB defined(HAVE_IMAP_AUTH_GSS) +#if HAVE_IMAP_KRB defined(HAVE_IMAP_AUTH_GSS) auth_link(auth_gss); /* link in the gss authenticator */ #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/imap php_imap.c php_imap.h
iliaa Fri Jan 24 12:10:40 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/imap php_imap.c php_imap.h Log: MFH (memory leak in quota functions). Index: php4/ext/imap/php_imap.c diff -u php4/ext/imap/php_imap.c:1.142.2.8 php4/ext/imap/php_imap.c:1.142.2.9 --- php4/ext/imap/php_imap.c:1.142.2.8 Fri Jan 24 05:13:16 2003 +++ php4/ext/imap/php_imap.cFri Jan 24 12:10:40 2003 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: php_imap.c,v 1.142.2.8 2003/01/24 10:13:16 sniper Exp $ */ +/* $Id: php_imap.c,v 1.142.2.9 2003/01/24 17:10:40 iliaa Exp $ */ #define IMAP41 @@ -339,7 +339,11 @@ void mail_getquota(MAILSTREAM *stream, char *qroot, QUOTALIST *qlist) { zval *t_map; + zval *return_value; TSRMLS_FETCH(); + + return_value = *IMAPG(quota_return); + /* put parsing code here */ for(; qlist; qlist = qlist-next) { MAKE_STD_ZVAL(t_map); @@ -352,13 +356,13 @@ if (strncmp(qlist-name, STORAGE, 7) == 0) { /* this is to add backwards compatibility */ - add_assoc_long_ex(IMAPG(quota_return), usage, sizeof(usage), qlist-usage); - add_assoc_long_ex(IMAPG(quota_return), limit, sizeof(limit), qlist-limit); + add_assoc_long_ex(return_value, usage, sizeof(usage), +qlist-usage); + add_assoc_long_ex(return_value, limit, sizeof(limit), +qlist-limit); } add_assoc_long_ex(t_map, usage, sizeof(usage), qlist-usage); add_assoc_long_ex(t_map, limit, sizeof(limit), qlist-limit); - add_assoc_zval_ex(IMAPG(quota_return), qlist-name, strlen(qlist-name)+1, t_map); + add_assoc_zval_ex(return_value, qlist-name, strlen(qlist-name)+1, +t_map); } } /* }}} */ @@ -862,22 +866,16 @@ convert_to_string_ex(qroot); - MAKE_STD_ZVAL(IMAPG(quota_return)); - if (array_init(IMAPG(quota_return)) == FAILURE) { - php_error(E_WARNING, %s(): Unable to allocate array memory, get_active_function_name(TSRMLS_C)); - FREE_ZVAL(IMAPG(quota_return)); - RETURN_FALSE; - } + array_init(return_value); + IMAPG(quota_return) = return_value; /* set the callback for the GET_QUOTA function */ mail_parameters(NIL, SET_QUOTA, (void *) mail_getquota); if(!imap_getquota(imap_le_struct-imap_stream, Z_STRVAL_PP(qroot))) { - php_error(E_WARNING, %s(): c-client imap_getquota failed, get_active_function_name(TSRMLS_C)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, c-client imap_getquota +failed); + zval_dtor(return_value); RETURN_FALSE; } - - *return_value = *IMAPG(quota_return); - FREE_ZVAL(IMAPG(quota_return)); } /* }}} */ @@ -896,22 +894,16 @@ convert_to_string_ex(mbox); - MAKE_STD_ZVAL(IMAPG(quota_return)); - if (array_init(IMAPG(quota_return)) == FAILURE) { - php_error(E_WARNING, %s(): Unable to allocate array memory, get_active_function_name(TSRMLS_C)); - FREE_ZVAL(IMAPG(quota_return)); - RETURN_FALSE; - } + array_init(return_value); + IMAPG(quota_return) = return_value; /* set the callback for the GET_QUOTAROOT function */ mail_parameters(NIL, SET_QUOTA, (void *) mail_getquota); if(!imap_getquotaroot(imap_le_struct-imap_stream, Z_STRVAL_PP(mbox))) { - php_error(E_WARNING, %s(): c-client imap_getquotaroot failed, get_active_function_name(TSRMLS_C)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, c-client +imap_getquotaroot failed); + zval_dtor(return_value); RETURN_FALSE; } - - *return_value = *IMAPG(quota_return); - FREE_ZVAL(IMAPG(quota_return)); } /* }}} */ Index: php4/ext/imap/php_imap.h diff -u php4/ext/imap/php_imap.h:1.24.2.1 php4/ext/imap/php_imap.h:1.24.2.2 --- php4/ext/imap/php_imap.h:1.24.2.1 Tue Dec 31 11:34:44 2002 +++ php4/ext/imap/php_imap.hFri Jan 24 12:10:40 2003 @@ -27,7 +27,7 @@ +--+ */ -/* $Id: php_imap.h,v 1.24.2.1 2002/12/31 16:34:44 sebastian Exp $ */ +/* $Id: php_imap.h,v 1.24.2.2 2003/01/24 17:10:40 iliaa Exp $ */ #ifndef PHP_IMAP_H #define PHP_IMAP_H @@ -200,7 +200,7 @@ unsigned long status_uidnext; unsigned long status_uidvalidity; #if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001) - zval *quota_return; + zval **quota_return; #endif ZEND_END_MODULE_GLOBALS(imap) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/imap php_imap.c
fmk Fri Dec 6 17:53:50 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/imap php_imap.c Log: MFH Index: php4/ext/imap/php_imap.c diff -u php4/ext/imap/php_imap.c:1.142.2.2 php4/ext/imap/php_imap.c:1.142.2.3 --- php4/ext/imap/php_imap.c:1.142.2.2 Sat Nov 30 16:52:36 2002 +++ php4/ext/imap/php_imap.cFri Dec 6 17:53:49 2002 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: php_imap.c,v 1.142.2.2 2002/11/30 21:52:36 fmk Exp $ */ +/* $Id: php_imap.c,v 1.142.2.3 2002/12/06 22:53:49 fmk Exp $ */ #define IMAP41 @@ -3222,7 +3222,8 @@ } } - strcat(bufferHeader, headers); + if (headers *headers) + strcat(bufferHeader, headers); if (TSendMail(INI_STR(SMTP), tsm_err, tsm_errmsg, bufferHeader, subject, bufferTo, message, bufferCc, bufferBcc, rpath) != SUCCESS) { if (tsm_errmsg) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/imap php_imap.c
fmk Sat Dec 7 01:05:52 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/imap php_imap.c Log: MFH Index: php4/ext/imap/php_imap.c diff -u php4/ext/imap/php_imap.c:1.142.2.3 php4/ext/imap/php_imap.c:1.142.2.4 --- php4/ext/imap/php_imap.c:1.142.2.3 Fri Dec 6 17:53:49 2002 +++ php4/ext/imap/php_imap.cSat Dec 7 01:05:52 2002 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: php_imap.c,v 1.142.2.3 2002/12/06 22:53:49 fmk Exp $ */ +/* $Id: php_imap.c,v 1.142.2.4 2002/12/07 06:05:52 fmk Exp $ */ #define IMAP41 @@ -3147,12 +3147,15 @@ char *bufferTo = NULL, *bufferCc = NULL, *bufferBcc = NULL, *bufferHeader = NULL; int offset, bufferLen = 0;; - if (headers) + if (headers) { bufferLen += strlen(headers); - if (to) + } + if (to) { bufferLen += strlen(to) + 6; - if (cc) + } + if (cc) { bufferLen += strlen(cc) + 6; + } bufferHeader = (char *)emalloc(bufferLen); memset(bufferHeader, 0, bufferLen); @@ -3222,8 +3225,9 @@ } } - if (headers *headers) + if (headers *headers) { strcat(bufferHeader, headers); + } if (TSendMail(INI_STR(SMTP), tsm_err, tsm_errmsg, bufferHeader, subject, bufferTo, message, bufferCc, bufferBcc, rpath) != SUCCESS) { if (tsm_errmsg) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php