sniper Fri Jan 24 04:40:53 2003 EDT Modified files: /php4/ext/snmp snmp.c Log: ws fixes Index: php4/ext/snmp/snmp.c diff -u php4/ext/snmp/snmp.c:1.73 php4/ext/snmp/snmp.c:1.74 --- php4/ext/snmp/snmp.c:1.73 Tue Dec 31 11:07:28 2002 +++ php4/ext/snmp/snmp.c Fri Jan 24 04:40:53 2003 @@ -1,24 +1,25 @@ /* -+----------------------------------------------------------------------+ -| PHP Version 4 | -+----------------------------------------------------------------------+ -| Copyright (c) 1997-2003 The PHP Group | -+----------------------------------------------------------------------+ -| This source file is subject to version 2.02 of the PHP license, | -| that is bundled with this package in the file LICENSE, and is | -| available at through the world-wide-web at | -| http://www.php.net/license/2_02.txt. | -| If you did not receive a copy of the PHP license and are unable to | -| obtain it through the world-wide-web, please send a note to | -| [EMAIL PROTECTED] so we can mail you a copy immediately. | -+----------------------------------------------------------------------+ -| Authors: Rasmus Lerdorf <[EMAIL PROTECTED]> | -| Mike Jackson <[EMAIL PROTECTED]> | -| Steven Lawrance <[EMAIL PROTECTED]> | -| Harrie Hazewinkel <[EMAIL PROTECTED]> | -+----------------------------------------------------------------------+ -*/ -/* $Id: snmp.c,v 1.73 2002/12/31 16:07:28 sebastian Exp $ */ + +----------------------------------------------------------------------+ + | PHP Version 4 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2003 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 2.02 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available at through the world-wide-web at | + | http://www.php.net/license/2_02.txt. | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | [EMAIL PROTECTED] so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Rasmus Lerdorf <[EMAIL PROTECTED]> | + | Mike Jackson <[EMAIL PROTECTED]> | + | Steven Lawrance <[EMAIL PROTECTED]> | + | Harrie Hazewinkel <[EMAIL PROTECTED]> | + +----------------------------------------------------------------------+ + */ + +/* $Id: snmp.c,v 1.74 2003/01/24 09:40:53 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -194,10 +195,7 @@ * st=11 snmpset() - query an agent and set a single value * */ -static void php_snmp_internal(INTERNAL_FUNCTION_PARAMETERS, - int st, - struct snmp_session *session, - char *objid) +static void php_snmp_internal(INTERNAL_FUNCTION_PARAMETERS, int st, struct +snmp_session *session, char *objid) { struct snmp_session *ss; struct snmp_pdu *pdu=NULL, *response; @@ -733,7 +731,8 @@ * st=11 snmp3_set() - query an agent and set a single value * */ -void php_snmpv3(INTERNAL_FUNCTION_PARAMETERS, int st) { +static void php_snmpv3(INTERNAL_FUNCTION_PARAMETERS, int st) +{ zval **a1, **a2, **a3, **a4, **a5, **a6, **a7, **a8, **a9, **a10, **a11, **a12; struct snmp_session session; long timeout=SNMP_DEFAULT_TIMEOUT; @@ -784,6 +783,7 @@ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid authentication protocol: %s", Z_STRVAL_PP(a4)); RETURN_FALSE; } + /* Setting the authentication passphrase. */ convert_to_string_ex(a5); if (netsnmp_session_gen_auth_key(&session, Z_STRVAL_PP(a5) TSRMLS_CC)) { @@ -798,6 +798,7 @@ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid security protocol: %s", Z_STRVAL_PP(a6)); RETURN_FALSE; } + /* Setting the security protocol passphrase. */ convert_to_string_ex(a7); if (netsnmp_session_gen_sec_key(&session, Z_STRVAL_PP(a7) TSRMLS_CC) &&
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php