summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/hyperwave/hw.c218
-rw-r--r--ext/icap/php_icap.c28
-rw-r--r--ext/imap/php_imap.c68
3 files changed, 157 insertions, 157 deletions
diff --git a/ext/hyperwave/hw.c b/ext/hyperwave/hw.c
index 978a1915c0..89a70e9be3 100644
--- a/ext/hyperwave/hw.c
+++ b/ext/hyperwave/hw.c
@@ -746,7 +746,7 @@ static void php_hw_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
if(host) efree(host);
if(password) efree(password);
if(username) efree(username);
- php_error(E_ERROR, "Could not get memory for connection details");
+ php_error(E_ERROR, "%s(): Could not get memory for connection details", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
sprintf(hashed_details, "hw_%s_%d", host, port);
@@ -759,7 +759,7 @@ static void php_hw_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
list_entry new_le;
if (HwSG(max_links)!=-1 && HwSG(num_links)>=HwSG(max_links)) {
- php_error(E_ERROR, "Hyperwave: Too many open links (%d)", HwSG(num_links));
+ php_error(E_ERROR, "%s(): Too many open links (%d)", get_active_function_name(TSRMLS_C), HwSG(num_links));
if(host) efree(host);
if(username) efree(username);
if(password) efree(password);
@@ -767,7 +767,7 @@ static void php_hw_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
RETURN_FALSE;
}
if (HwSG(max_persistent!=-1) && HwSG(num_persistent)>=HwSG(max_persistent)) {
- php_error(E_ERROR, "Hyperwave: Too many open persistent links (%d)", HwSG(num_persistent));
+ php_error(E_ERROR, "%s(): Too many open persistent links (%d)", get_active_function_name(TSRMLS_C), HwSG(num_persistent));
if(host) efree(host);
if(username) efree(username);
if(password) efree(password);
@@ -776,7 +776,7 @@ static void php_hw_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
}
if ( (sockfd = open_hg_connection(host, port)) < 0 ) {
- php_error(E_ERROR, "Could not open connection to %s, Port: %d (retval=%d, errno=%d)", host, port, sockfd, errno);
+ php_error(E_ERROR, "%s(): Could not open connection to %s, Port: %d (retval=%d, errno=%d)", get_active_function_name(TSRMLS_C), host, port, sockfd, errno);
if(host) efree(host);
if(username) efree(username);
if(password) efree(password);
@@ -785,7 +785,7 @@ static void php_hw_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
}
if(NULL == (ptr = malloc(sizeof(hw_connection)))) {
- php_error(E_ERROR, "Could not get memory for connection structure");
+ php_error(E_ERROR, "%s(): Could not get memory for connection structure", get_active_function_name(TSRMLS_C));
if(host) efree(host);
if(username) efree(username);
if(password) efree(password);
@@ -794,7 +794,7 @@ static void php_hw_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
}
if(0 != (ptr->lasterror = initialize_hg_connection(sockfd, &do_swap, &version, &userdata, &server_string, username, password))) {
- php_error(E_ERROR, "Could not initalize hyperwave connection");
+ php_error(E_ERROR, "%s(): Could not initalize hyperwave connection", get_active_function_name(TSRMLS_C));
if(host) efree(host);
if(username) efree(username);
if(password) efree(password);
@@ -819,7 +819,7 @@ static void php_hw_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
Z_TYPE(new_le) = le_psocketp;
if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length+1, (void *) &new_le, sizeof(list_entry), NULL)==FAILURE) {
- php_error(E_ERROR, "Could not hash table with connection details");
+ php_error(E_ERROR, "%s(): Could not hash table with connection details", get_active_function_name(TSRMLS_C));
if(host) efree(host);
if(username) efree(username);
if(password) efree(password);
@@ -872,7 +872,7 @@ static void php_hw_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
}
if ( (sockfd = open_hg_connection(host, port)) < 0 ) {
- php_error(E_ERROR, "Could not open connection to %s, Port: %d (retval=%d", host, port, sockfd);
+ php_error(E_ERROR, "%s(): Could not open connection to %s, Port: %d (retval=%d", get_active_function_name(TSRMLS_C), host, port, sockfd);
if(host) efree(host);
if(username) efree(username);
if(password) efree(password);
@@ -889,7 +889,7 @@ static void php_hw_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
}
if(0 != (ptr->lasterror = initialize_hg_connection(sockfd, &do_swap, &version, &userdata, &server_string, username, password))) {
- php_error(E_ERROR, "Could not initalize hyperwave connection");
+ php_error(E_ERROR, "%s(): Could not initalize hyperwave connection", get_active_function_name(TSRMLS_C));
if(host) efree(host);
if(username) efree(username);
if(password) efree(password);
@@ -916,7 +916,7 @@ static void php_hw_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
new_index_ptr.ptr = (void *) Z_LVAL_P(return_value);
Z_TYPE(new_index_ptr) = le_index_ptr;
if (zend_hash_update(&EG(regular_list), hashed_details, hashed_details_length+1, (void *) &new_index_ptr, sizeof(list_entry), NULL)==FAILURE) {
- php_error(E_ERROR, "Could not update connection details in hash table");
+ php_error(E_ERROR, "%s(): Could not update connection details in hash table", get_active_function_name(TSRMLS_C));
if(host) efree(host);
efree(hashed_details);
RETURN_FALSE;
@@ -982,7 +982,7 @@ PHP_FUNCTION(hw_close)
id=Z_LVAL_PP(arg1);
ptr = zend_list_find(id, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
zend_list_delete(id);
@@ -1006,7 +1006,7 @@ PHP_FUNCTION(hw_info)
id=Z_LVAL_PP(arg1);
ptr = zend_list_find(id, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
if(NULL != (str = get_hw_info(ptr))) {
@@ -1038,7 +1038,7 @@ PHP_FUNCTION(hw_error)
id=Z_LVAL_PP(arg1);
ptr = zend_list_find(id, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
RETURN_LONG(ptr->lasterror);
@@ -1061,7 +1061,7 @@ PHP_FUNCTION(hw_errormsg)
id=Z_LVAL_PP(arg1);
ptr = zend_list_find(id, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
@@ -1352,7 +1352,7 @@ char *php_hw_command(INTERNAL_FUNCTION_PARAMETERS, int comm) {
link=Z_LVAL_PP(arg1);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", link);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), link);
return NULL;
}
@@ -1519,7 +1519,7 @@ PHP_FUNCTION(hw_dummy)
msgid=Z_LVAL_PP(arg3);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
@@ -1570,7 +1570,7 @@ PHP_FUNCTION(hw_getobject)
link=Z_LVAL_PP(argv[0]);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", link);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), link);
RETURN_FALSE;
}
@@ -1646,7 +1646,7 @@ PHP_FUNCTION(hw_insertobject)
parms=Z_STRVAL_P(arg3);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", link);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), link);
RETURN_FALSE;
}
@@ -1678,7 +1678,7 @@ PHP_FUNCTION(hw_getandlock)
id=Z_LVAL_P(arg2);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
@@ -1710,7 +1710,7 @@ PHP_FUNCTION(hw_unlock)
id=Z_LVAL_P(arg2);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
@@ -1739,7 +1739,7 @@ PHP_FUNCTION(hw_deleteobject)
id=Z_LVAL_P(arg2);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
@@ -1772,7 +1772,7 @@ PHP_FUNCTION(hw_changeobject)
newobjarr=Z_ARRVAL_P(arg3);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
@@ -1875,7 +1875,7 @@ PHP_FUNCTION(hw_modifyobject)
addobjarr=Z_ARRVAL_PP(argv[3]);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
@@ -2030,7 +2030,7 @@ PHP_FUNCTION(hw_modifyobject)
if (0 == (ptr->lasterror = send_lock(ptr->socket, id))) {
if (0 == (ptr->lasterror = send_changeobject(ptr->socket, id, modification))) {
if (0 != (ptr->lasterror = send_unlock(ptr->socket, id))) {
- php_error(E_WARNING, "Aiii, Changeobject failed and couldn't unlock object (id = 0x%X)", id);
+ php_error(E_WARNING, "%s(): Aiii, Changeobject failed and couldn't unlock object (id = 0x%X)", get_active_function_name(TSRMLS_C), id);
free(modification);
RETURN_FALSE;
}
@@ -2042,7 +2042,7 @@ PHP_FUNCTION(hw_modifyobject)
RETURN_FALSE;
}
} else {
- php_error(E_WARNING, "Could not lock object (id = 0x%X)", id);
+ php_error(E_WARNING, "%s(): Could not lock object (id = 0x%X)", get_active_function_name(TSRMLS_C), id);
free(modification);
RETURN_FALSE;
}
@@ -2061,7 +2061,7 @@ PHP_FUNCTION(hw_modifyobject)
}
break;
default:
- php_error(E_WARNING, "hw_modifyobject: Mode must be 0 or 1 (recursive)");
+ php_error(E_WARNING, "%s(): Mode must be 0 or 1 (recursive)", get_active_function_name(TSRMLS_C));
}
free(modification);
RETURN_TRUE;
@@ -2106,7 +2106,7 @@ void php_hw_mvcp(INTERNAL_FUNCTION_PARAMETERS, int mvcp) {
}
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", link);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), link);
RETURN_FALSE;
}
@@ -2218,7 +2218,7 @@ PHP_FUNCTION(hw_gettext)
id=Z_LVAL_P(argv[1]);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
@@ -2260,7 +2260,7 @@ PHP_FUNCTION(hw_edittext)
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find socket identifier %d", link);
+ php_error(E_WARNING, "%s(): Unable to find socket identifier %d", get_active_function_name(TSRMLS_C), link);
RETURN_FALSE;
}
@@ -2268,7 +2268,7 @@ PHP_FUNCTION(hw_edittext)
docptr = zend_list_find(doc, &type);
if(!docptr || (type!=le_document)) {
- php_error(E_WARNING, "Unable to find document identifier %d", doc);
+ php_error(E_WARNING, "%s(): Unable to find document identifier %d", get_active_function_name(TSRMLS_C), doc);
RETURN_FALSE;
}
@@ -2303,7 +2303,7 @@ PHP_FUNCTION(hw_getcgi)
id=Z_LVAL_P(arg2);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
@@ -2365,7 +2365,7 @@ PHP_FUNCTION(hw_getremote)
id=Z_LVAL_P(arg2);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
@@ -2406,7 +2406,7 @@ PHP_FUNCTION(hw_getremotechildren)
objrec=Z_STRVAL_P(arg2);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", link);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), link);
RETURN_FALSE;
}
set_swap(ptr->swap_on);
@@ -2510,7 +2510,7 @@ PHP_FUNCTION(hw_setlinkroot)
rootid = Z_LVAL_P(arg2);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", link);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), link);
RETURN_FALSE;
}
@@ -2556,7 +2556,7 @@ PHP_FUNCTION(hw_pipedocument)
id=Z_LVAL_P(arg2);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", link);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), link);
RETURN_FALSE;
}
@@ -2565,7 +2565,7 @@ PHP_FUNCTION(hw_pipedocument)
convert_to_array(arg3);
prefixarray =Z_ARRVAL_P(arg3);
if((prefixarray == NULL) || (zend_hash_num_elements(prefixarray) != 5)) {
- php_error(E_WARNING, "You must provide 5 urlprefixes (you have provided %d)", zend_hash_num_elements(prefixarray));
+ php_error(E_WARNING, "%s(): You must provide 5 urlprefixes (you have provided %d)", get_active_function_name(TSRMLS_C), zend_hash_num_elements(prefixarray));
RETURN_FALSE;
}
@@ -2580,7 +2580,7 @@ PHP_FUNCTION(hw_pipedocument)
zend_hash_get_current_data(prefixarray, (void *) &dataptr);
data = *dataptr;
if (Z_TYPE_P(data) != IS_STRING) {
- php_error(E_WARNING, "%s must be a String", key);
+ php_error(E_WARNING, "%s(): %s must be a String", get_active_function_name(TSRMLS_C), key);
RETURN_FALSE;
} else if ( strcmp(key, "HW_DEFAULT_LINK") == 0 ) {
urlprefix[HW_DEFAULT_LINK] = Z_STRVAL_P(data);
@@ -2593,7 +2593,7 @@ PHP_FUNCTION(hw_pipedocument)
} else if ( strcmp(key, "HW_APPLET_LINK") == 0 ) {
urlprefix[HW_APPLET_LINK] = Z_STRVAL_P(data);
} else {
- php_error(E_WARNING, "%s is not a valid urlprefix", key);
+ php_error(E_WARNING, "%s(): %s is not a valid urlprefix", get_active_function_name(TSRMLS_C), key);
RETURN_FALSE;
}
zend_hash_move_forward(prefixarray);
@@ -2669,7 +2669,7 @@ PHP_FUNCTION(hw_oldpipedocument)
id=Z_LVAL_P(argv[1]);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", link);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), link);
RETURN_FALSE;
}
@@ -2730,7 +2730,7 @@ PHP_FUNCTION(hw_pipecgi)
id=Z_LVAL_P(arg2);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
@@ -2796,14 +2796,14 @@ PHP_FUNCTION(hw_insertdocument)
id=Z_LVAL_P(arg2);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find connection identifier %d", link);
+ php_error(E_WARNING, "%s(): Unable to find connection identifier %d", get_active_function_name(TSRMLS_C), link);
RETURN_FALSE;
}
doc=Z_LVAL_P(arg3);
docptr = zend_list_find(doc, &type);
if(!docptr || (type!=le_document)) {
- php_error(E_WARNING, "Unable to find document identifier %d", doc);
+ php_error(E_WARNING, "%s(): Unable to find document identifier %d", get_active_function_name(TSRMLS_C), doc);
RETURN_FALSE;
}
@@ -2922,7 +2922,7 @@ PHP_FUNCTION(hw_free_document)
id=Z_LVAL_P(arg1);
ptr = zend_list_find(id, &type);
if(!ptr || (type!=le_document)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
zend_list_delete(id);
@@ -2949,7 +2949,7 @@ PHP_FUNCTION(hw_output_document)
id=Z_LVAL_P(arg1);
ptr = zend_list_find(id, &type);
if(!ptr || (type!=le_document)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
@@ -2983,7 +2983,7 @@ PHP_FUNCTION(hw_document_bodytag)
id=Z_LVAL_P(argv[0]);
ptr = zend_list_find(id, &type);
if(!ptr || (type!=le_document)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
@@ -3028,7 +3028,7 @@ PHP_FUNCTION(hw_document_content)
id=Z_LVAL_P(argv[0]);
ptr = zend_list_find(id, &type);
if(!ptr || (type!=le_document)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
@@ -3057,7 +3057,7 @@ PHP_FUNCTION(hw_document_setcontent)
id=Z_LVAL_P(argv[0]);
ptr = zend_list_find(id, &type);
if(!ptr || (type!=le_document)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
@@ -3092,7 +3092,7 @@ PHP_FUNCTION(hw_document_size)
id=Z_LVAL_P(arg1);
ptr = zend_list_find(id, &type);
if(!ptr || (type!=le_document)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
@@ -3119,7 +3119,7 @@ PHP_FUNCTION(hw_document_attributes)
id=Z_LVAL_P(arg1);
ptr = zend_list_find(id, &type);
if(!ptr || (type!=le_document)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
@@ -3147,14 +3147,14 @@ PHP_FUNCTION(hw_getparentsobj)
id=Z_LVAL_P(arg2);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
set_swap(ptr->swap_on);
if (0 != (ptr->lasterror = send_getparentsobj(ptr->socket, id, &childObjRecs, &count))) {
- php_error(E_WARNING, "send_command (getparentsobj) returned %d\n", ptr->lasterror);
+ php_error(E_WARNING, "%s(): Command returned %d\n", get_active_function_name(TSRMLS_C), ptr->lasterror);
RETURN_FALSE;
}
@@ -3182,7 +3182,7 @@ PHP_FUNCTION(hw_getparents)
id=Z_LVAL_P(arg2);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
@@ -3192,7 +3192,7 @@ PHP_FUNCTION(hw_getparents)
int i;
if (0 != (ptr->lasterror = send_getparents(ptr->socket, id, &childIDs, &count))) {
- php_error(E_WARNING, "send_command (getparents) returned %d\n", ptr->lasterror);
+ php_error(E_WARNING, "%s(): Command returned %d\n", get_active_function_name(TSRMLS_C), ptr->lasterror);
RETURN_FALSE;
}
@@ -3228,7 +3228,7 @@ PHP_FUNCTION(hw_children)
id=Z_LVAL_PP(arg2);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
@@ -3238,7 +3238,7 @@ PHP_FUNCTION(hw_children)
int i;
if (0 != (ptr->lasterror = send_children(ptr->socket, id, &childIDs, &count))){
- php_error(E_WARNING, "send_command (getchildcoll) returned %d\n", ptr->lasterror);
+ php_error(E_WARNING, "%s(): Command returned %d\n", get_active_function_name(TSRMLS_C), ptr->lasterror);
RETURN_FALSE;
}
@@ -3275,14 +3275,14 @@ PHP_FUNCTION(hw_childrenobj)
id=Z_LVAL_PP(arg2);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
set_swap(ptr->swap_on);
if (0 != (ptr->lasterror = send_childrenobj(ptr->socket, id, &childObjRecs, &count))) {
- php_error(E_WARNING, "send_command (getchildcollobj) returned %d\n", ptr->lasterror);
+ php_error(E_WARNING, "%s(): Command returned %d\n", get_active_function_name(TSRMLS_C), ptr->lasterror);
RETURN_FALSE;
}
@@ -3310,7 +3310,7 @@ PHP_FUNCTION(hw_getchildcoll)
id=Z_LVAL_PP(arg2);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
@@ -3320,7 +3320,7 @@ PHP_FUNCTION(hw_getchildcoll)
int i;
if (0 != (ptr->lasterror = send_getchildcoll(ptr->socket, id, &childIDs, &count))){
- php_error(E_WARNING, "send_command (getchildcoll) returned %d\n", ptr->lasterror);
+ php_error(E_WARNING, "%s(): Command returned %d\n", get_active_function_name(TSRMLS_C), ptr->lasterror);
RETURN_FALSE;
}
@@ -3357,14 +3357,14 @@ PHP_FUNCTION(hw_getchildcollobj)
id=Z_LVAL_PP(arg2);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
set_swap(ptr->swap_on);
if (0 != (ptr->lasterror = send_getchildcollobj(ptr->socket, id, &childObjRecs, &count))) {
- php_error(E_WARNING, "send_command (getchildcollobj) returned %d\n", ptr->lasterror);
+ php_error(E_WARNING, "%s(): Command returned %d\n", get_active_function_name(TSRMLS_C), ptr->lasterror);
RETURN_FALSE;
}
@@ -3391,7 +3391,7 @@ PHP_FUNCTION(hw_docbyanchor)
id=Z_LVAL_PP(arg2);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
@@ -3423,7 +3423,7 @@ PHP_FUNCTION(hw_docbyanchorobj)
id=Z_LVAL_PP(arg2);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
@@ -3465,13 +3465,13 @@ PHP_FUNCTION(hw_getobjectbyquery)
if (maxhits < 0) maxhits=0x7FFFFFFF;
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", link);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), link);
RETURN_FALSE;
}
set_swap(ptr->swap_on);
if (0 != (ptr->lasterror = send_getobjbyquery(ptr->socket, query, maxhits, &childIDs, &count))) {
- php_error(E_WARNING, "send_command (getobjectbyquery) returned %d\n", ptr->lasterror);
+ php_error(E_WARNING, "%s(): Command returned %d\n", get_active_function_name(TSRMLS_C), ptr->lasterror);
RETURN_FALSE;
}
@@ -3509,13 +3509,13 @@ PHP_FUNCTION(hw_getobjectbyqueryobj)
if (maxhits < 0) maxhits=0x7FFFFFFF;
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", link);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), link);
RETURN_FALSE;
}
set_swap(ptr->swap_on);
if (0 != (ptr->lasterror = send_getobjbyqueryobj(ptr->socket, query, maxhits, &childObjRecs, &count))) {
- php_error(E_WARNING, "send_command (getobjectbyqueryobj) returned %d\n", ptr->lasterror);
+ php_error(E_WARNING, "%s(): Command returned %d\n", get_active_function_name(TSRMLS_C), ptr->lasterror);
RETURN_FALSE;
}
@@ -3550,13 +3550,13 @@ PHP_FUNCTION(hw_getobjectbyquerycoll)
if (maxhits < 0) maxhits=0x7FFFFFFF;
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
set_swap(ptr->swap_on);
if (0 != (ptr->lasterror = send_getobjbyquerycoll(ptr->socket, id, query, maxhits, &childIDs, &count))) {
- php_error(E_WARNING, "send_command (getobjectbyquerycoll) returned %d\n", ptr->lasterror);
+ php_error(E_WARNING, "%s(): Command returned %d\n", get_active_function_name(TSRMLS_C), ptr->lasterror);
RETURN_FALSE;
}
@@ -3596,13 +3596,13 @@ PHP_FUNCTION(hw_getobjectbyquerycollobj)
if (maxhits < 0) maxhits=0x7FFFFFFF;
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
set_swap(ptr->swap_on);
if (0 != (ptr->lasterror = send_getobjbyquerycollobj(ptr->socket, id, query, maxhits, &childObjRecs, &count))) {
- php_error(E_WARNING, "send_command (getobjectbyquerycollobj) returned %d\n", ptr->lasterror);
+ php_error(E_WARNING, "%s(): Command returned %d\n", get_active_function_name(TSRMLS_C), ptr->lasterror);
RETURN_FALSE;
}
@@ -3636,13 +3636,13 @@ PHP_FUNCTION(hw_getobjectbyftquery)
if (maxhits < 0) maxhits=0x7FFFFFFF;
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", link);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), link);
RETURN_FALSE;
}
set_swap(ptr->swap_on);
if (0 != (ptr->lasterror = send_getobjbyftquery(ptr->socket, query, maxhits, &childIDs, &weights, &count))) {
- php_error(E_WARNING, "send_command (getobjectbyftquery) returned %d\n", ptr->lasterror);
+ php_error(E_WARNING, "%s(): Command returned %d\n", get_active_function_name(TSRMLS_C), ptr->lasterror);
RETURN_FALSE;
}
@@ -3681,13 +3681,13 @@ PHP_FUNCTION(hw_getobjectbyftqueryobj)
if (maxhits < 0) maxhits=0x7FFFFFFF;
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", link);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), link);
RETURN_FALSE;
}
set_swap(ptr->swap_on);
if (0 != (ptr->lasterror = send_getobjbyftqueryobj(ptr->socket, query, maxhits, &childObjRecs, &weights, &count))) {
- php_error(E_WARNING, "send_command (getobjectbyftqueryobj) returned %d\n", ptr->lasterror);
+ php_error(E_WARNING, "%s(): Command returned %d\n", get_active_function_name(TSRMLS_C), ptr->lasterror);
RETURN_FALSE;
}
@@ -3723,13 +3723,13 @@ PHP_FUNCTION(hw_getobjectbyftquerycoll)
if (maxhits < 0) maxhits=0x7FFFFFFF;
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
set_swap(ptr->swap_on);
if (0 != (ptr->lasterror = send_getobjbyftquerycoll(ptr->socket, id, query, maxhits, &childIDs, &weights, &count))) {
- php_error(E_WARNING, "send_command (getobjectbyquerycoll) returned %d\n", ptr->lasterror);
+ php_error(E_WARNING, "%s(): Command returned %d\n", get_active_function_name(TSRMLS_C), ptr->lasterror);
RETURN_FALSE;
}
@@ -3770,13 +3770,13 @@ PHP_FUNCTION(hw_getobjectbyftquerycollobj)
if (maxhits < 0) maxhits=0x7FFFFFFF;
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
set_swap(ptr->swap_on);
if (0 != (ptr->lasterror = send_getobjbyftquerycollobj(ptr->socket, id, query, maxhits, &childObjRecs, &weights, &count))) {
- php_error(E_WARNING, "send_command (getobjectbyquerycollobj) returned %d\n", ptr->lasterror);
+ php_error(E_WARNING, "%s(): Command returned %d\n", get_active_function_name(TSRMLS_C), ptr->lasterror);
RETURN_FALSE;
}
@@ -3805,13 +3805,13 @@ PHP_FUNCTION(hw_getchilddoccoll)
id=Z_LVAL_PP(arg2);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
set_swap(ptr->swap_on);
if (0 != (ptr->lasterror = send_getchilddoccoll(ptr->socket, id, &childIDs, &count))) {
- php_error(E_WARNING, "send_command (getchilddoccoll) returned %d\n", ptr->lasterror);
+ php_error(E_WARNING, "%s(): Command returned %d\n", get_active_function_name(TSRMLS_C), ptr->lasterror);
RETURN_FALSE;
}
@@ -3845,13 +3845,13 @@ PHP_FUNCTION(hw_getchilddoccollobj)
id=Z_LVAL_PP(arg2);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
set_swap(ptr->swap_on);
if (0 != (ptr->lasterror = send_getchilddoccollobj(ptr->socket, id, &childObjRecs, &count))) {
- php_error(E_WARNING, "send_command (getchilddoccollobj) returned %d\n", ptr->lasterror);
+ php_error(E_WARNING, "%s(): Command returned %d\n", get_active_function_name(TSRMLS_C), ptr->lasterror);
RETURN_FALSE;
}
@@ -3881,13 +3881,13 @@ PHP_FUNCTION(hw_getanchors)
id=Z_LVAL_PP(arg2);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
set_swap(ptr->swap_on);
if (0 != (ptr->lasterror = send_getanchors(ptr->socket, id, &anchorIDs, &count))) {
- php_error(E_WARNING, "send_command (getanchors) returned %d\n", ptr->lasterror);
+ php_error(E_WARNING, "%s(): Command returned %d\n", get_active_function_name(TSRMLS_C), ptr->lasterror);
RETURN_FALSE;
}
@@ -3921,13 +3921,13 @@ PHP_FUNCTION(hw_getanchorsobj)
id=Z_LVAL_PP(arg2);
ptr = (hw_connection *) zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", id);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
set_swap(ptr->swap_on);
if (0 != (ptr->lasterror = send_getanchorsobj(ptr->socket, id, &anchorObjRecs, &count))) {
- php_error(E_WARNING, "send_command (getanchors) returned %d\n", ptr->lasterror);
+ php_error(E_WARNING, "%s(): Command returned %d\n", get_active_function_name(TSRMLS_C), ptr->lasterror);
RETURN_FALSE;
}
@@ -3952,7 +3952,7 @@ PHP_FUNCTION(hw_getusername)
link = Z_LVAL_PP(arg1);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", link);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), link);
RETURN_FALSE;
}
@@ -3982,7 +3982,7 @@ PHP_FUNCTION(hw_identify)
passwd=Z_STRVAL_PP(arg3);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", link);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), link);
RETURN_FALSE;
}
@@ -3991,7 +3991,7 @@ PHP_FUNCTION(hw_identify)
char *str;
if (0 != (ptr->lasterror = send_identify(ptr->socket, name, passwd, &userdata))) {
- php_error(E_WARNING, "send_identify returned %d\n", ptr->lasterror);
+ php_error(E_WARNING, "%s(): Command returned %d\n", get_active_function_name(TSRMLS_C), ptr->lasterror);
if(ptr->username) free(ptr->username);
ptr->username = NULL;
RETURN_FALSE;
@@ -4079,19 +4079,19 @@ PHP_FUNCTION(hw_incollections)
retcoll=Z_LVAL_PP(arg4);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", link);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), link);
RETURN_FALSE;
}
cobjids = zend_hash_num_elements(Z_ARRVAL_PP(arg2));
if(NULL == (objectIDs = make_ints_from_array(Z_ARRVAL_PP(arg2)))) {
- php_error(E_WARNING, "Could not create Int Array from Array\n");
+ php_error(E_WARNING, "%s(): Could not create Int Array from Array", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
ccollids = zend_hash_num_elements(Z_ARRVAL_PP(arg3));
if(NULL == (collIDs = make_ints_from_array(Z_ARRVAL_PP(arg3)))) {
- php_error(E_WARNING, "Could not create Int Array from Array\n");
+ php_error(E_WARNING, "%s(): Could not create Int Array from Array", get_active_function_name(TSRMLS_C));
efree(objectIDs);
RETURN_FALSE;
}
@@ -4140,12 +4140,12 @@ PHP_FUNCTION(hw_inscoll)
id=Z_LVAL_PP(arg2);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", link);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), link);
RETURN_FALSE;
}
if(NULL == (objrec = make_objrec_from_array(Z_ARRVAL_PP(arg3)))) {
- php_error(E_WARNING, "Could not create Object Record from Array\n");
+ php_error(E_WARNING, "%s(): Could not create Object Record from Array", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
@@ -4189,7 +4189,7 @@ PHP_FUNCTION(hw_insdoc)
id = Z_LVAL_PP(argv[1]);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", link);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), link);
RETURN_FALSE;
}
@@ -4222,13 +4222,13 @@ PHP_FUNCTION(hw_getsrcbydestobj)
id=Z_LVAL_PP(arg2);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", link);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), link);
RETURN_FALSE;
}
set_swap(ptr->swap_on);
if (0 != (ptr->lasterror = send_getsrcbydest(ptr->socket, id, &childObjRecs, &count))) {
- php_error(E_WARNING, "send_command (getsrcbydest) returned %d\n", ptr->lasterror);
+ php_error(E_WARNING, "%s(): Command returned %d", get_active_function_name(TSRMLS_C), ptr->lasterror);
RETURN_FALSE;
}
@@ -4257,13 +4257,13 @@ PHP_FUNCTION(hw_mapid)
id=Z_LVAL_PP(arg3);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", link);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), link);
RETURN_FALSE;
}
set_swap(ptr->swap_on);
if (0 != (ptr->lasterror = send_mapid(ptr->socket, servid, id, &virtid))) {
- php_error(E_WARNING, "send_command (mapid) returned %d\n", ptr->lasterror);
+ php_error(E_WARNING, "%s(): Command returned %d", get_active_function_name(TSRMLS_C), ptr->lasterror);
RETURN_FALSE;
}
RETURN_LONG(virtid);
@@ -4293,13 +4293,13 @@ PHP_FUNCTION(hw_getrellink)
destid=Z_LVAL_PP(arg4);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", link);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), link);
RETURN_FALSE;
}
set_swap(ptr->swap_on);
if (0 != (ptr->lasterror = getrellink(ptr->socket, rootid, sourceid, destid, &anchorstr))) {
- php_error(E_WARNING, "command (getrellink) returned %d\n", ptr->lasterror);
+ php_error(E_WARNING, "%s(): Command returned %d", get_active_function_name(TSRMLS_C), ptr->lasterror);
RETURN_FALSE;
}
@@ -4343,7 +4343,7 @@ PHP_FUNCTION(hw_insertanchors)
docid=Z_LVAL_PP(arg1);
hwdoc = zend_list_find(docid, &type);
if(!hwdoc || (type!=le_document)) {
- php_error(E_WARNING, "Unable to find file identifier %d", docid);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), docid);
RETURN_FALSE;
}
@@ -4353,7 +4353,7 @@ PHP_FUNCTION(hw_insertanchors)
convert_to_array_ex(arg4);
prefixarray =Z_ARRVAL_PP(arg4);
if((prefixarray == NULL) || (zend_hash_num_elements(prefixarray) != 5)) {
- php_error(E_WARNING, "You must provide 5 urlprefixes (you have provided %d)", zend_hash_num_elements(prefixarray));
+ php_error(E_WARNING, "%s(): You must provide 5 urlprefixes (you have provided %d)", get_active_function_name(TSRMLS_C), zend_hash_num_elements(prefixarray));
RETURN_FALSE;
}
@@ -4368,7 +4368,7 @@ PHP_FUNCTION(hw_insertanchors)
zend_hash_get_current_data(prefixarray, (void *) &dataptr);
data = *dataptr;
if (Z_TYPE_P(data) != IS_STRING) {
- php_error(E_WARNING, "%s must be a String", key);
+ php_error(E_WARNING, "%s(): %s must be a String", get_active_function_name(TSRMLS_C), key);
RETURN_FALSE;
} else if ( strcmp(key, "HW_DEFAULT_LINK") == 0 ) {
urlprefix[HW_DEFAULT_LINK] = Z_STRVAL_P(data);
@@ -4381,7 +4381,7 @@ PHP_FUNCTION(hw_insertanchors)
} else if ( strcmp(key, "HW_APPLET_LINK") == 0 ) {
urlprefix[HW_APPLET_LINK] = Z_STRVAL_P(data);
} else {
- php_error(E_WARNING, "%s is not a valid urlprefix", key);
+ php_error(E_WARNING, "%s(): %s is not a valid urlprefix", get_active_function_name(TSRMLS_C), key);
RETURN_FALSE;
}
zend_hash_move_forward(prefixarray);
@@ -4391,7 +4391,7 @@ PHP_FUNCTION(hw_insertanchors)
}
if(zend_hash_num_elements(Z_ARRVAL_PP(arg2)) != zend_hash_num_elements(Z_ARRVAL_PP(arg3))) {
- php_error(E_WARNING, "Unequal number of elments in arrays");
+ php_error(E_WARNING, "%s(): Unequal number of elements in arrays", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
@@ -4402,7 +4402,7 @@ PHP_FUNCTION(hw_insertanchors)
dest = make_strs_from_array(arrht);
if (0 != (error = send_insertanchors(&(hwdoc->data), &count, anchorrecs, dest, zend_hash_num_elements(arrht), urlprefix, &bodytag))) {
- php_error(E_WARNING, "command (insertanchors) returned %d\n", error);
+ php_error(E_WARNING, "%s(): Command returned %d", get_active_function_name(TSRMLS_C), error);
RETURN_FALSE;
}
/*fprintf(stderr, "in hw_insertanchors: %s\n", hwdoc->attributes); */
@@ -4439,7 +4439,7 @@ PHP_FUNCTION(hw_connection_info)
link=Z_LVAL_PP(arg1);
ptr = zend_list_find(link, &type);
if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
- php_error(E_WARNING, "Unable to find file identifier %d", link);
+ php_error(E_WARNING, "%s(): Unable to find file identifier %d", get_active_function_name(TSRMLS_C), link);
RETURN_FALSE;
}
diff --git a/ext/icap/php_icap.c b/ext/icap/php_icap.c
index 59975e3176..126975ffa2 100644
--- a/ext/icap/php_icap.c
+++ b/ext/icap/php_icap.c
@@ -187,7 +187,7 @@ void php_icap_do_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
}
icap_stream = cal_open(NULL, Z_STRVAL_P(calendar), 0);
if (!icap_stream) {
- php_error(E_WARNING, "Couldn't open stream %s\n", Z_STRVAL_P(calendar));
+ php_error(E_WARNING, "%s(): Couldn't open stream %s", get_active_function_name(TSRMLS_C), Z_STRVAL_P(calendar));
RETURN_FALSE;
}
@@ -216,7 +216,7 @@ PHP_FUNCTION(icap_close)
ind = Z_LVAL_P(streamind);
icap_le_struct = (pils *)zend_list_find(ind, &ind_type);
if (!icap_le_struct ) {
- php_error(E_WARNING, "Unable to find stream pointer");
+ php_error(E_WARNING, "%s(): Unable to find stream pointer", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
if(myargcount==2) {
@@ -261,7 +261,7 @@ PHP_FUNCTION(icap_reopen)
ind = Z_LVAL_P(streamind);
icap_le_struct = (pils *)zend_list_find(ind, &ind_type);
if (!icap_le_struct ) {
- php_error(E_WARNING, "Unable to find stream pointer");
+ php_error(E_WARNING, "%s(): Unable to find stream pointer", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
@@ -276,7 +276,7 @@ PHP_FUNCTION(icap_reopen)
cal_login(icap_stream, Z_STRVAL_P(calendar));
*/
if (icap_stream == NULL) {
- php_error(E_WARNING, "Couldn't re-open stream\n");
+ php_error(E_WARNING, "%s(): Couldn't re-open stream", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
RETURN_TRUE;
@@ -304,7 +304,7 @@ PHP_FUNCTION(icap_expunge)
icap_le_struct = (pils *)zend_list_find(ind, &ind_type);
if (!icap_le_struct ) {
- php_error(E_WARNING, "Unable to find stream pointer");
+ php_error(E_WARNING, "%s(): Unable to find stream pointer", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
@@ -332,7 +332,7 @@ PHP_FUNCTION(icap_fetch_event)
ind = Z_LVAL_P(streamind);
icap_le_struct = (pils *)zend_list_find(ind, &ind_type);
if (!icap_le_struct ) {
- php_error(E_WARNING, "Unable to find stream pointer");
+ php_error(E_WARNING, "%s(): Unable to find stream pointer", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
if(myargcount==3) {
@@ -410,7 +410,7 @@ PHP_FUNCTION(icap_list_events)
icap_le_struct = (pils *)zend_list_find(ind, &ind_type);
if (!icap_le_struct ) {
- php_error(E_WARNING, "Unable to find stream pointer");
+ php_error(E_WARNING, "%s(): Unable to find stream pointer", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
@@ -488,7 +488,7 @@ PHP_FUNCTION(icap_create_calendar)
icap_le_struct = (pils *)zend_list_find(ind, &ind_type);
if (!icap_le_struct ) {
- php_error(E_WARNING, "Unable to find stream pointer");
+ php_error(E_WARNING, "%s(): Unable to find stream pointer", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
/*
@@ -524,7 +524,7 @@ PHP_FUNCTION(icap_rename_calendar)
icap_le_struct = (pils *)zend_list_find(ind, &ind_type);
if (!icap_le_struct ) {
- php_error(E_WARNING, "Unable to find stream pointer");
+ php_error(E_WARNING, "%s(): Unable to find stream pointer", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
/*
@@ -562,7 +562,7 @@ PHP_FUNCTION(icap_list_alarms)
icap_le_struct = (pils *)zend_list_find(ind, &ind_type);
if (!icap_le_struct ) {
- php_error(E_WARNING, "Unable to find stream pointer");
+ php_error(E_WARNING, "%s(): Unable to find stream pointer", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
@@ -632,7 +632,7 @@ PHP_FUNCTION(icap_delete_calendar)
icap_le_struct = (pils *)zend_list_find(ind, &ind_type);
if (!icap_le_struct ) {
- php_error(E_WARNING, "Unable to find stream pointer");
+ php_error(E_WARNING, "%s(): Unable to find stream pointer", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
@@ -667,7 +667,7 @@ PHP_FUNCTION(icap_delete_event)
icap_le_struct = (pils *)zend_list_find(ind, &ind_type);
if (!icap_le_struct ) {
- php_error(E_WARNING, "Unable to find stream pointer");
+ php_error(E_WARNING, "%s(): Unable to find stream pointer", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
if (cal_remove(icap_le_struct->icap_stream, Z_LVAL_P(uid)))
@@ -724,7 +724,7 @@ PHP_FUNCTION(icap_store_event)
icap_le_struct = (pils *)zend_list_find(ind, &ind_type);
if (!icap_le_struct ) {
- php_error(E_WARNING, "Unable to find stream pointer");
+ php_error(E_WARNING, "%s(): Unable to find stream pointer", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
@@ -869,7 +869,7 @@ PHP_FUNCTION(icap_snooze)
icap_le_struct = (pils *)zend_list_find(ind, &ind_type);
if (!icap_le_struct ) {
- php_error(E_WARNING, "Unable to find stream pointer");
+ php_error(E_WARNING, "%s(): Unable to find stream pointer", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c
index be9accb99f..f67607324f 100644
--- a/ext/imap/php_imap.c
+++ b/ext/imap/php_imap.c
@@ -637,7 +637,7 @@ PHP_RSHUTDOWN_FUNCTION(imap)
if (EG(error_reporting) & E_NOTICE) {
ecur = IMAPG(imap_errorstack);
while (ecur != NIL) {
- php_error(E_NOTICE, "%s (errflg=%d)", ecur->LTEXT, ecur->errflg);
+ php_error(E_NOTICE, "%s(): %s (errflg=%d)", get_active_function_name(TSRMLS_C), ecur->LTEXT, ecur->errflg);
ecur = ecur->next;
}
}
@@ -649,7 +649,7 @@ PHP_RSHUTDOWN_FUNCTION(imap)
if (EG(error_reporting) & E_NOTICE) {
acur = IMAPG(imap_alertstack);
while (acur != NIL) {
- php_error(E_NOTICE, acur->LTEXT);
+ php_error(E_NOTICE, "%s(): %s", get_active_function_name(TSRMLS_C), acur->LTEXT);
acur = acur->next;
}
}
@@ -862,7 +862,7 @@ static void php_imap_do_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
imap_stream = mail_open(NIL, Z_STRVAL_PP(mailbox), flags);
if (imap_stream == NIL) {
- php_error(E_WARNING, "Couldn't open stream %s\n", Z_STRVAL_PP(mailbox));
+ php_error(E_WARNING, "%s(): Couldn't open stream %s", get_active_function_name(TSRMLS_C), Z_STRVAL_PP(mailbox));
efree(IMAPG(imap_user)); IMAPG(imap_user) = 0;
efree(IMAPG(imap_password)); IMAPG(imap_password) = 0;
RETURN_FALSE;
@@ -901,7 +901,7 @@ PHP_FUNCTION(imap_popen)
php_imap_do_open(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
RETURN_TRUE;
#else
- php_error(E_WARNING, "Persistent IMAP connections are not yet supported.\n");
+ php_error(E_WARNING, "%s(): Persistent IMAP connections are not yet supported.", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
#endif
}
@@ -937,7 +937,7 @@ PHP_FUNCTION(imap_reopen)
}
imap_stream = mail_open(imap_le_struct->imap_stream, Z_STRVAL_PP(mailbox), flags);
if (imap_stream == NIL) {
- php_error(E_WARNING, "Couldn't re-open stream\n");
+ php_error(E_WARNING, "%s(): Couldn't re-open stream", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
imap_le_struct->imap_stream = imap_stream;
@@ -1047,12 +1047,12 @@ PHP_FUNCTION(imap_get_quota)
/* set the callback for the GET_QUOTA function */
mail_parameters(NIL, SET_QUOTA, (void *) mail_getquota);
if(!imap_getquota(imap_le_struct->imap_stream, Z_STRVAL_PP(qroot))) {
- php_error(E_WARNING, "c-client imap_getquota failed");
+ php_error(E_WARNING, "%s(): c-client imap_getquota failed", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
if (array_init(return_value) == FAILURE) {
- php_error(E_WARNING, "Unable to allocate array memory");
+ php_error(E_WARNING, "%s(): Unable to allocate array memory", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
@@ -1241,7 +1241,7 @@ PHP_FUNCTION(imap_body)
msgindex = Z_LVAL_PP(msgno);
}
if ((msgindex < 1) || ((unsigned) msgindex > imap_le_struct->imap_stream->nmsgs)) {
- php_error(E_WARNING, "Bad message number");
+ php_error(E_WARNING, "%s(): Bad message number", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
@@ -1614,7 +1614,7 @@ PHP_FUNCTION(imap_headerinfo)
}
if (!Z_LVAL_PP(msgno) || Z_LVAL_PP(msgno) < 1 || (unsigned) Z_LVAL_PP(msgno) > imap_le_struct->imap_stream->nmsgs) {
- php_error(E_WARNING, "Bad message number");
+ php_error(E_WARNING, "%s(): Bad message number", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
@@ -1865,14 +1865,14 @@ PHP_FUNCTION(imap_fetchstructure)
msgindex = Z_LVAL_PP(msgno);
}
if ((msgindex < 1) || ((unsigned) msgindex > imap_le_struct->imap_stream->nmsgs)) {
- php_error(E_WARNING, "Bad message number");
+ php_error(E_WARNING, "%s(): Bad message number", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
mail_fetchstructure_full(imap_le_struct->imap_stream, Z_LVAL_PP(msgno), &body , myargc == 3 ? Z_LVAL_PP(flags) : NIL);
if (!body) {
- php_error(E_WARNING, "No body information available");
+ php_error(E_WARNING, "%s(): No body information available", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
@@ -1905,7 +1905,7 @@ PHP_FUNCTION(imap_fetchbody)
body = mail_fetchbody_full(imap_le_struct->imap_stream, Z_LVAL_PP(msgno), Z_STRVAL_PP(sec), &len, myargc==4 ? Z_LVAL_PP(flags) : NIL);
if (!body) {
- php_error(E_WARNING, "No body information available");
+ php_error(E_WARNING, "%s(): No body information available", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
RETVAL_STRINGL(body, len, 1);
@@ -2226,12 +2226,12 @@ PHP_FUNCTION(imap_utf7_decode)
if (state == ST_NORMAL) {
/* process printable character */
if (SPECIAL(*inp)) {
- php_error(E_WARNING, "imap_utf7_decode: Invalid modified UTF-7 character: `%c'", *inp);
+ php_error(E_WARNING, "%s(): Invalid modified UTF-7 character: `%c'", get_active_function_name(TSRMLS_C), *inp);
RETURN_FALSE;
} else if (*inp != '&') {
outlen++;
} else if (inp + 1 == endp) {
- php_error(E_WARNING, "imap_utf7_decode: Unexpected end of string");
+ php_error(E_WARNING, "%s(): Unexpected end of string", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
} else if (inp[1] != '-') {
state = ST_DECODE0;
@@ -2242,12 +2242,12 @@ PHP_FUNCTION(imap_utf7_decode)
} else if (*inp == '-') {
/* return to NORMAL mode */
if (state == ST_DECODE1) {
- php_error(E_WARNING, "imap_utf7_decode: Stray modified base64 character: `%c'", *--inp);
+ php_error(E_WARNING, "%s(): Stray modified base64 character: `%c'", get_active_function_name(TSRMLS_C), *--inp);
RETURN_FALSE;
}
state = ST_NORMAL;
} else if (!B64CHAR(*inp)) {
- php_error(E_WARNING, "imap_utf7_decode: Invalid modified base64 character: `%c'", *inp);
+ php_error(E_WARNING, "%s(): Invalid modified base64 character: `%c'", get_active_function_name(TSRMLS_C), *inp);
RETURN_FALSE;
} else {
switch (state) {
@@ -2268,13 +2268,13 @@ PHP_FUNCTION(imap_utf7_decode)
/* enforce end state */
if (state != ST_NORMAL) {
- php_error(E_WARNING, "imap_utf7_decode: Unexpected end of string");
+ php_error(E_WARNING, "%s(): Unexpected end of string", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
/* allocate output buffer */
if ((out = emalloc(outlen + 1)) == NULL) {
- php_error(E_WARNING, "imap_utf7_decode: Unable to allocate result string");
+ php_error(E_WARNING, "%s(): Unable to allocate result string", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
@@ -2326,7 +2326,7 @@ PHP_FUNCTION(imap_utf7_decode)
#if PHP_DEBUG
/* warn if we computed outlen incorrectly */
if (outp - out != outlen) {
- php_error(E_WARNING, "imap_utf7_decode: outp - out [%d] != outlen [%d]", outp - out, outlen);
+ php_error(E_WARNING, "%s(): outp - out [%d] != outlen [%d]", get_active_function_name(TSRMLS_C), outp - out, outlen);
}
#endif
@@ -2392,7 +2392,7 @@ PHP_FUNCTION(imap_utf7_encode)
/* allocate output buffer */
if ((out = emalloc(outlen + 1)) == NULL) {
- php_error(E_WARNING, "imap_utf7_encode: Unable to allocate result string");
+ php_error(E_WARNING, "%s(): Unable to allocate result string", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
@@ -2444,7 +2444,7 @@ PHP_FUNCTION(imap_utf7_encode)
#if PHP_DEBUG
/* warn if we computed outlen incorrectly */
if (outp - out != outlen) {
- php_error(E_WARNING, "imap_utf7_encode: outp - out [%d] != outlen [%d]", outp - out, outlen);
+ php_error(E_WARNING, "%s(): outp - out [%d] != outlen [%d]", get_active_function_name(TSRMLS_C), outp - out, outlen);
}
#endif
@@ -2528,7 +2528,7 @@ PHP_FUNCTION(imap_sort)
convert_to_long_ex(rev);
convert_to_long_ex(pgm);
if (Z_LVAL_PP(pgm) > SORTSIZE) {
- php_error(E_WARNING, "Unrecognized sort criteria");
+ php_error(E_WARNING, "%s(): Unrecognized sort criteria", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
if (myargc >= 4) {
@@ -2592,7 +2592,7 @@ PHP_FUNCTION(imap_fetchheader)
}
if ((msgindex < 1) || ((unsigned) msgindex > imap_le_struct->imap_stream->nmsgs)) {
- php_error(E_WARNING, "Bad message number");
+ php_error(E_WARNING, "%s(): Bad message number", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
@@ -2618,7 +2618,7 @@ PHP_FUNCTION(imap_uid)
msgindex = Z_LVAL_PP(msgno);
if ((msgindex < 1) || ((unsigned) msgindex > imap_le_struct->imap_stream->nmsgs)) {
- php_error(E_WARNING, "Bad message number");
+ php_error(E_WARNING, "%s(): Bad message number", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
@@ -2708,7 +2708,7 @@ PHP_FUNCTION(imap_bodystruct)
convert_to_string_ex(section);
if (!Z_LVAL_PP(msg) || Z_LVAL_PP(msg) < 1 || (unsigned) Z_LVAL_PP(msg) > imap_le_struct->imap_stream->nmsgs) {
- php_error(E_WARNING, "Bad message number");
+ php_error(E_WARNING, "%s(): Bad message number", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
@@ -2906,12 +2906,12 @@ PHP_FUNCTION(imap_mail_compose)
}
if (Z_TYPE_PP(envelope) != IS_ARRAY) {
- php_error(E_WARNING, "IMAP: Expected Array as envelope parameter");
+ php_error(E_WARNING, "%s(): Expected Array as envelope parameter", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
if (Z_TYPE_PP(body) != IS_ARRAY) {
- php_error(E_WARNING, "IMAP: Expected Array as body parameter");
+ php_error(E_WARNING, "%s(): Expected Array as body parameter", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
@@ -3252,7 +3252,7 @@ int _php_imap_mail(char *to, char *subject, char *message, char *headers, char *
#ifdef PHP_WIN32
if (imap_TSendMail(INI_STR("SMTP"), &tsm_err, headers, subject, to, message, cc, bcc, rpath) != SUCCESS) {
- php_error(E_WARNING, "%s", GetSMErrorText(tsm_err));
+ php_error(E_WARNING, "%s(): %s", get_active_function_name(TSRMLS_C), GetSMErrorText(tsm_err));
return 0;
}
#else
@@ -3277,7 +3277,7 @@ int _php_imap_mail(char *to, char *subject, char *message, char *headers, char *
return 1;
}
} else {
- php_error(E_WARNING, "Could not execute mail delivery program");
+ php_error(E_WARNING, "%s(): Could not execute mail delivery program", get_active_function_name(TSRMLS_C));
return 0;
}
#endif
@@ -3302,7 +3302,7 @@ PHP_FUNCTION(imap_mail)
if (Z_STRVAL_PP(argv[0])) {
to = Z_STRVAL_PP(argv[0]);
} else {
- php_error(E_WARNING, "No to field in mail command");
+ php_error(E_WARNING, "%s(): No to field in mail command", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
@@ -3311,7 +3311,7 @@ PHP_FUNCTION(imap_mail)
if (Z_STRVAL_PP(argv[1])) {
subject = Z_STRVAL_PP(argv[1]);
} else {
- php_error(E_WARNING, "No subject field in mail command");
+ php_error(E_WARNING, "%s(): No subject field in mail command", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
@@ -3321,7 +3321,7 @@ PHP_FUNCTION(imap_mail)
message = Z_STRVAL_PP(argv[2]);
} else {
/* this is not really an error, so it is allowed. */
- php_error(E_WARNING, "No message string in mail command");
+ php_error(E_WARNING, "%s(): No message string in mail command", get_active_function_name(TSRMLS_C));
message = NULL;
}
@@ -3576,7 +3576,7 @@ PHP_FUNCTION(imap_mime_header_decode)
}
efree(charset);
} else {
- php_error(E_WARNING, "Unable to allocate temporary memory buffer for imap_mime_header_decode");
+ php_error(E_WARNING, "%s(): Unable to allocate temporary memory buffer", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
}
@@ -3936,7 +3936,7 @@ PHP_FUNCTION (imap_thread)
top = mail_thread(imap_le_struct->imap_stream, "REFERENCES", NIL, mail_criteria(criteria), flags);
if(top == NIL) {
- php_error(E_WARNING, "imap_thread returned an empty tree");
+ php_error(E_WARNING, "%s(): Function returned an empty tree", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}