[PATCH] ext/snmp/snmp.c memleaks
| From: | Gustaf Gunnarsson | Date: | Wed, 20 Jun 2007 09:40:51 +0000 |
| Subject: | [PATCH] ext/snmp/snmp.c memleaks | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-30301@lists.php.net to get a copy of this message | ||
Hi,
the following patch fixes memory leaks in the snmp module.
Diff against PHP 5.2 CVS branch.
I'd also like to supply a patch later adding support for multiple
set/get operations in one PDU. I'd like not to use php_snmp_internal()
function for my new operations because I think that function is to
complex and hard to audit. Is that acceptable?
The new function definitions would be something like:
array snmp_mget(string $version, string $hostname, mixed
$authparameters, array $variables, [int $timeout, [int $retries]])
Where $authparameters may be (possibly) one of
string <community>
array (<community>)
array (snmpv3param1, snmpv3param2,....)
$variables = array('var1','var2',...)
Result will be returned in same fashion as realwalk().
and
boolean snmp_mset(string $version, string $hostname, mixed
$authparameters, array $variables, [int $timeout, [int $retries]])
$variables = array(
array('oid','type','value'),
array('oid2','type2','value2')
);
//Gustaf