CVS update: php3/functions

From: Date: Fri, 14 Aug 1998 17:52:45 +0000
Subject: CVS update: php3/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-235@lists.php.net to get a copy of this message
Date: Friday August 14, 1998 @ 13:52 Author: musone Update of /repository/php3/functions In directory asf:/tmp/cvs-serv1685 Modified Files: imap.c Log Message: fixed a possible memory leak Index: php3/functions/imap.c diff -c php3/functions/imap.c:1.7 php3/functions/imap.c:1.8 *** php3/functions/imap.c:1.7 Fri Aug 7 09:27:15 1998 --- php3/functions/imap.c Fri Aug 14 13:52:45 1998 *************** *** 1497,1520 **** void php3_imap_rfc822_write_address(INTERNAL_FUNCTION_PARAMETERS) { ! pval *mailbox,*host,*personal; ! ADDRESS *addr; ! char string[MAILTMPLEN]; ! int argc=ARG_COUNT(ht); ! ! if ( argc <2 || argc>3 || getParameters( ht, argc, &mailbox,&host,&personal) == FAILURE ) { ! WRONG_PARAM_COUNT; ! } ! convert_to_string(mailbox); ! convert_to_string(host); ! convert_to_string(personal); ! addr=mail_newaddr(); ! ! if(mailbox) addr->mailbox=cpystr(mailbox->value.str.val); ! if(host) addr->host=cpystr(host->value.str.val); ! if(personal) addr->personal=cpystr(personal->value.str.val); ! rfc822_write_address(string,addr); ! RETVAL_STRING(string,1); } void php3_imap_rfc822_parse_adrlist(INTERNAL_FUNCTION_PARAMETERS) --- 1497,1524 ---- void php3_imap_rfc822_write_address(INTERNAL_FUNCTION_PARAMETERS) { ! pval *mailbox,*host,*personal; ! ADDRESS *addr; ! char string[MAILTMPLEN]; ! int argc; ! argc=ARG_COUNT(ht); ! if ( argc <2 || argc>3 || getParameters( ht, argc, &mailbox,&host,&personal) == FAILURE ) { ! WRONG_PARAM_COUNT; ! } ! convert_to_string(mailbox); ! convert_to_string(host); ! convert_to_string(personal); ! addr=mail_newaddr(); ! if(mailbox) addr->mailbox=cpystr(mailbox->value.str.val); ! if(host) addr->host=cpystr(host->value.str.val); ! if(personal) addr->personal=cpystr(personal->value.str.val); ! addr->next=NIL; ! addr->error=NIL; ! addr->adl=NIL; ! string[0]=0x00; ! ! rfc822_write_address(string,addr); ! RETVAL_STRING(string,1); } void php3_imap_rfc822_parse_adrlist(INTERNAL_FUNCTION_PARAMETERS) -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#235) next »