|
cvs: pecl /pop3 package.xml pop3.c: msg#00196php.pecl.cvs
iliaa Mon Jul 25 17:47:07 2005 EDT Modified files: /pecl/pop3 package.xml pop3.c Log: Fixed build for 4.3.X http://cvs.php.net/diff.php/pecl/pop3/package.xml?r1=1.4&r2=1.5&ty=u Index: pecl/pop3/package.xml diff -u pecl/pop3/package.xml:1.4 pecl/pop3/package.xml:1.5 --- pecl/pop3/package.xml:1.4 Thu Jul 14 16:50:33 2005 +++ pecl/pop3/package.xml Mon Jul 25 17:47:03 2005 @@ -18,15 +18,15 @@ <user>iliaa</user> <name>Ilia Alshanetsky</name> <email>ilia@xxxxxxx</email> - <role>developer</role> + <role>lead</role> </maintainer> </maintainers> <release> - <version>1.0.1</version> - <date>2005-07-14</date> + <version>1.0.2</version> + <date>2005-07-25</date> <license>PHP</license> <state>stable</state> - <notes>Minor release -- Removed old inclusion no longer needed</notes> + <notes>Minor release -- Fixed PHP 4.3.X build.</notes> <deps> <dep type="php" rel="ge" version="4"/> </deps> http://cvs.php.net/diff.php/pecl/pop3/pop3.c?r1=1.18&r2=1.19&ty=u Index: pecl/pop3/pop3.c diff -u pecl/pop3/pop3.c:1.18 pecl/pop3/pop3.c:1.19 --- pecl/pop3/pop3.c:1.18 Thu Mar 11 09:07:24 2004 +++ pecl/pop3/pop3.c Mon Jul 25 17:47:03 2005 @@ -16,7 +16,7 @@ | Ilia Alshanetsky <ilia@xxxxxxx> | +----------------------------------------------------------------------+ - $Id: pop3.c,v 1.18 2004/03/11 14:07:24 iliaa Exp $ + $Id: pop3.c,v 1.19 2005/07/25 21:47:03 iliaa Exp $ */ #ifdef HAVE_CONFIG_H @@ -27,6 +27,10 @@ #include "php_ini.h" #include "ext/standard/info.h" #include "ext/standard/md5.h" /* needed for APOP auth */ +#ifndef ZEND_ENGINE_2 +#include "ext/standard/url.h" +#include "main/php_network.h" +#endif #include "php_pop3.h" #include <sys/types.h> @@ -38,11 +42,11 @@ /* {{{ Internal macros */ -#define POP3_VERSION "0.1" +#define POP3_VERSION "1.0.2" #define POP3_RESOURCE_NAME "POP3 Library Session" #define POP3_FETCH_SESSION(session, session_container) \ - ZEND_FETCH_RESOURCE ((void *) session, int *, &session_container, -1, POP3_RESOURCE_NAME, le_pop3_resource); + ZEND_FETCH_RESOURCE ( session, php_stream *, &session_container, -1, POP3_RESOURCE_NAME, le_pop3_resource); #ifdef ZEND_ENGINE_2 @@ -89,16 +93,9 @@ static int le_pop3_resource; -/* }}} */ - -#ifdef ZEND_ENGINE_2 - -static zend_object_handlers pop3_object_handlers; - - /* {{{ _pop3_receive_response */ -int _pop3_receive_response (php_stream *stream, char *response TSRMLS_DC) /* Returns SUCCESS or FAIL */ +static int _pop3_receive_response (php_stream *stream, char *response TSRMLS_DC) /* Returns SUCCESS or FAIL */ { char buffer[2048]; size_t fetch_len; @@ -131,7 +128,7 @@ /* _pop3_send_command {{{ */ -int _pop3_send_command (php_stream *stream, char *command, char *response TSRMLS_DC) +static int _pop3_send_command (php_stream *stream, char *command, char *response TSRMLS_DC) { if ((!php_stream_write_string(stream, command)) || (!php_stream_write_string(stream, "\r\n"))) { php_error_docref(NULL TSRMLS_CC, E_ERROR, "I/O Error when sending data to server"); @@ -142,6 +139,9 @@ /* }}} */ +#ifdef ZEND_ENGINE_2 + +static zend_object_handlers pop3_object_handlers; /* {{{ pop3_objects_dtor */ @@ -376,7 +376,11 @@ POP3_DECLARE_INIT_OBJECT(object) php_stream *stream; +#ifndef ZEND_ENGINE_2 + php_url *resource = NULL; +#else char *errstr = NULL; +#endif /* Parse parameters */ @@ -386,6 +390,7 @@ RETURN_FALSE; } +#ifdef ZEND_ENGINE_2 stream = php_stream_xport_create (server_name, server_name_length, 0, @@ -401,6 +406,18 @@ efree(errstr); RETURN_FALSE; } +#else + resource = php_url_parse(server_name); + if (resource == NULL) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid server name identifier %s.", server_name); + RETURN_FALSE; + } + + stream = php_stream_sock_open_host(resource->host, resource->port, SOCK_STREAM, NULL, 0); + + php_url_free(resource); +#endif + if (!stream) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to connect to server"); |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | cvs: pecl /apc apc.php: 00196, Ilia Alshanetsky |
|---|---|
| Next by Date: | cvs: pecl /apc apc.php: 00196, Ralf Becker |
| Previous by Thread: | cvs: pecl /sdo/DAS/Relational/Scenarios 1c-C.php 1c-CD.php 1c-CRU.php 1c-CRUD.php 1c-DCsamePK.php 1c-R.php 1c-RA.php 1c-RD.php 1c-RU.php 1c-RUnull.php 1c-RUunsetPrimitive.php 1cd-C.php 1cd-CRUD.php 1cd-RA.php 1cde-C.php 1cde-CRU.php 1cde-CRUD.php 1cde-CRUDdetach.php 1cde-R.php 1e-CRUD.php mc-C.php mc-R.php mc-RD.php mc-RU.phpi: 00196, Matthew Peters |
| Next by Thread: | cvs: pecl /http http_request_api.c http_request_object.c php_http_request_object.h: 00196, Michael Wallner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |