[PHP-CVS] cvs: php-src /ext/snmp winsnmp.c /win32 php5dll.dsp php5dllts.dsp

2008-11-21 Thread Jani Taskinen
janiFri Nov 21 16:37:49 2008 UTC

  Removed files:   
/php-src/ext/snmp   winsnmp.c 

  Modified files:  
/php-src/win32  php5dll.dsp php5dllts.dsp 
  Log:
  - Nuke unused file
  
  
http://cvs.php.net/viewvc.cgi/php-src/win32/php5dll.dsp?r1=1.6&r2=1.7&diff_format=u
Index: php-src/win32/php5dll.dsp
diff -u php-src/win32/php5dll.dsp:1.6 php-src/win32/php5dll.dsp:1.7
--- php-src/win32/php5dll.dsp:1.6   Fri Nov 10 09:56:37 2006
+++ php-src/win32/php5dll.dsp   Fri Nov 21 16:37:49 2008
@@ -1564,10 +1564,6 @@
 # End Source File
 # Begin Source File
 
-SOURCE=..\ext\snmp\winsnmp.c
-# End Source File
-# Begin Source File
-
 SOURCE=..\win32\winutil.c
 # End Source File
 # Begin Source File
http://cvs.php.net/viewvc.cgi/php-src/win32/php5dllts.dsp?r1=1.10&r2=1.11&diff_format=u
Index: php-src/win32/php5dllts.dsp
diff -u php-src/win32/php5dllts.dsp:1.10 php-src/win32/php5dllts.dsp:1.11
--- php-src/win32/php5dllts.dsp:1.10Sat Mar  3 21:40:23 2007
+++ php-src/win32/php5dllts.dsp Fri Nov 21 16:37:49 2008
@@ -2056,10 +2056,6 @@
 # End Source File
 # Begin Source File
 
-SOURCE=..\ext\snmp\winsnmp.c
-# End Source File
-# Begin Source File
-
 SOURCE=..\win32\winutil.c
 # End Source File
 # Begin Source File



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/snmp winsnmp.c

2008-11-07 Thread Kalle Sommer Nielsen
kalle   Fri Nov  7 11:05:09 2008 UTC

  Modified files:  
/php-src/ext/snmp   winsnmp.c 
  Log:
  New parameter parsing API
  
http://cvs.php.net/viewvc.cgi/php-src/ext/snmp/winsnmp.c?r1=1.19&r2=1.20&diff_format=u
Index: php-src/ext/snmp/winsnmp.c
diff -u php-src/ext/snmp/winsnmp.c:1.19 php-src/ext/snmp/winsnmp.c:1.20
--- php-src/ext/snmp/winsnmp.c:1.19 Thu Sep 27 18:28:42 2007
+++ php-src/ext/snmp/winsnmp.c  Fri Nov  7 11:05:09 2008
@@ -57,34 +57,32 @@
 
 /* {{{ _php_snmp
  */
-void _php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) {
-   zval *a1, *a2, *a3;
-   INT operation;
-LPSTR  agent;
-LPSTR  community;
-RFC1157VarBindList variableBindings;
-LPSNMP_MGR_SESSION session;
-
-INTtimeout = TIMEOUT;
-INTretries = RETRIES;
-
-BYTE   requestType;
-AsnInteger errorStatus;
-AsnInteger errorIndex;
-AsnObjectIdentifier oid;
-   char*chkPtr = NULL;
+void _php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st)
+{
+   INT operation;
 
-   if (zend_get_parameters_ex(3, &a1, &a2, &a3) == FAILURE) {
-   WRONG_PARAM_COUNT;
+   RFC1157VarBindList variableBindings;
+   LPSNMP_MGR_SESSION session;
+
+   char *agent, *community, *object_id;
+   int agent_len, community_len, object_id_len;
+
+   INT timeout = TIMEOUT;
+   INT retries = RETRIES;
+
+   BYTE requestType;
+   AsnInteger errorStatus;
+   AsnInteger errorIndex;
+   AsnObjectIdentifier oid;
+
+   char *chkPtr = NULL;
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss", &agent, 
&agent_len, &community, &community_len, &object_id, &object_id_len) == FAILURE) 
{
+return;
}
-   convert_to_string_ex(a1);
-   convert_to_string_ex(a2);
-   convert_to_string_ex(a3);
-
-   agent=Z_STRVAL_PP(a1);
-   community=Z_STRVAL_PP(a2);
-   operation=st;
-   SnmpMgrStrToOid(Z_STRVAL_PP(a3), &oid);
+
+   operation = st;
+   SnmpMgrStrToOid(object_id, &oid);
 
 /* 
I've limited this to only one oid, but we can create a



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php