summaryrefslogtreecommitdiff
path: root/ext/snmp
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>1999-08-02 19:17:14 +0000
committerZeev Suraski <zeev@php.net>1999-08-02 19:17:14 +0000
commit3cb1eb047187d53688545ae6f64d4df880298e72 (patch)
tree7fb20f178b9df5a33a83a2b7537f5614910697c0 /ext/snmp
parent07e0885519ccabbd9cebfce7223be657171a6629 (diff)
downloadphp-git-3cb1eb047187d53688545ae6f64d4df880298e72.tar.gz
Removed '3' from key functions in PHP (maintained compatibility through
php3_compat.h)
Diffstat (limited to 'ext/snmp')
-rw-r--r--ext/snmp/snmp.c16
-rw-r--r--ext/snmp/winsnmp.c24
2 files changed, 20 insertions, 20 deletions
diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c
index 31ece45700..fa709fe097 100644
--- a/ext/snmp/snmp.c
+++ b/ext/snmp/snmp.c
@@ -94,7 +94,7 @@ int php3i_snmp_init(INIT_FUNC_ARGS) {
}
void php3_info_snmp(ZEND_MODULE_INFO_FUNC_ARGS) {
- php3_printf("ucd-snmp");
+ php_printf("ucd-snmp");
}
@@ -144,7 +144,7 @@ void _php3_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) {
if (read_objid(objid, root, &rootlen)) {
gotroot = 1;
} else {
- php3_error(E_WARNING,"Invalid object identifier: %s\n", objid);
+ php_error(E_WARNING,"Invalid object identifier: %s\n", objid);
}
}
if (gotroot == 0) {
@@ -177,7 +177,7 @@ void _php3_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) {
snmp_synch_setup(&session);
ss = snmp_open(&session);
if (ss == NULL){
- php3_error(E_WARNING,"Couldn't open snmp\n");
+ php_error(E_WARNING,"Couldn't open snmp\n");
RETURN_FALSE;
}
if (st>=2) {
@@ -195,7 +195,7 @@ void _php3_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) {
if (st==1) {
name_length = MAX_NAME_LEN;
if (!read_objid(objid, name, &name_length)) {
- php3_error(E_WARNING,"Invalid object identifier: %s\n", objid);
+ php_error(E_WARNING,"Invalid object identifier: %s\n", objid);
RETURN_FALSE;
}
}
@@ -232,12 +232,12 @@ retry:
}
} else {
if (st!=2 || response->errstat != SNMP_ERR_NOSUCHNAME) {
- php3_error(E_WARNING,"Error in packet.\nReason: %s\n", snmp_errstring(response->errstat));
+ php_error(E_WARNING,"Error in packet.\nReason: %s\n", snmp_errstring(response->errstat));
if (response->errstat == SNMP_ERR_NOSUCHNAME) {
for(count=1, vars = response->variables; vars && count != response->errindex;
vars = vars->next_variable, count++);
if (vars) sprint_objid(buf,vars->name, vars->name_length);
- php3_error(E_WARNING,"This name does not exist: %s\n",buf);
+ php_error(E_WARNING,"This name does not exist: %s\n",buf);
}
if (st==1) {
if ((pdu = snmp_fix_pdu(response, SNMP_MSG_GET)) != NULL) goto retry;
@@ -248,10 +248,10 @@ retry:
}
}
} else if (status == STAT_TIMEOUT) {
- php3_error(E_WARNING,"No Response from %s\n", a1->value.str.val);
+ php_error(E_WARNING,"No Response from %s\n", a1->value.str.val);
RETURN_FALSE;
} else { /* status == STAT_ERROR */
- php3_error(E_WARNING,"An error occurred, Quitting\n");
+ php_error(E_WARNING,"An error occurred, Quitting\n");
RETURN_FALSE;
}
if (response) snmp_free_pdu(response);
diff --git a/ext/snmp/winsnmp.c b/ext/snmp/winsnmp.c
index 38042f9e6c..fd6c5932ec 100644
--- a/ext/snmp/winsnmp.c
+++ b/ext/snmp/winsnmp.c
@@ -87,7 +87,7 @@ void _php3_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) {
for the session are also required.
*/
if ((session = SnmpMgrOpen(agent, community, timeout, retries)) == NULL){
- php3_error(E_WARNING,"error on SnmpMgrOpen %d\n", GetLastError());
+ php_error(E_WARNING,"error on SnmpMgrOpen %d\n", GetLastError());
}
/* Determine and perform the requested operation.*/
@@ -106,12 +106,12 @@ void _php3_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) {
if (!SnmpMgrRequest(session, requestType, &variableBindings,
&errorStatus, &errorIndex)){
/* The API is indicating an error. */
- php3_error(E_WARNING,"error on SnmpMgrRequest %d\n", GetLastError());
+ php_error(E_WARNING,"error on SnmpMgrRequest %d\n", GetLastError());
} else {
/* The API succeeded, errors may be indicated from the remote
agent. */
if (errorStatus > 0){
- php3_error(E_WARNING,"Error: errorStatus=%d, errorIndex=%d\n",
+ php_error(E_WARNING,"Error: errorStatus=%d, errorIndex=%d\n",
errorStatus, errorIndex);
} else {
/* Display the resulting variable bindings.*/
@@ -121,13 +121,13 @@ void _php3_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) {
for(i=0; i < variableBindings.len; i++)
{
SnmpMgrOidToStr(&variableBindings.list[i].name, &string);
- php3_printf("Variable = %s\n", string);
+ php_printf("Variable = %s\n", string);
if (string) SNMP_free(string);
- php3_printf("Value = ");
+ php_printf("Value = ");
SnmpUtilPrintAsnAny(&variableBindings.list[i].value);
- php3_printf("\n");
+ php_printf("\n");
} /* end for() */
}
}
@@ -152,7 +152,7 @@ void _php3_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) {
if (!SnmpMgrRequest(session, requestType, &variableBindings,
&errorStatus, &errorIndex)){
/* The API is indicating an error.*/
- php3_error(E_WARNING,"error on SnmpMgrRequest %d\n", GetLastError());
+ php_error(E_WARNING,"error on SnmpMgrRequest %d\n", GetLastError());
break;
}
else
@@ -170,7 +170,7 @@ void _php3_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) {
/* Test for general error conditions or sucesss. */
if (errorStatus > 0){
- php3_error(E_ERROR,"Error: errorStatus=%d, errorIndex=%d \n",
+ php_error(E_ERROR,"Error: errorStatus=%d, errorIndex=%d \n",
errorStatus, errorIndex);
break;
}
@@ -180,13 +180,13 @@ void _php3_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) {
char *string = NULL;
SnmpMgrOidToStr(&variableBindings.list[0].name, &string);
- php3_printf("Variable = %s\n", string);
+ php_printf("Variable = %s\n", string);
if (string) SNMP_free(string);
- php3_printf("Value = ");
+ php_printf("Value = ");
SnmpUtilPrintAsnAny(&variableBindings.list[0].value);
- php3_printf("\n");
+ php_printf("\n");
}
} /* end if () */
/* Prepare for the next iteration. Make sure returned oid is
@@ -206,7 +206,7 @@ void _php3_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) {
/* Close SNMP session with the remote agent.*/
if (!SnmpMgrClose(session)){
- php3_error(E_WARNING,"error on SnmpMgrClose %d\n", GetLastError());
+ php_error(E_WARNING,"error on SnmpMgrClose %d\n", GetLastError());
}
}