summaryrefslogtreecommitdiff
path: root/src/sp_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp_utils.c')
-rw-r--r--src/sp_utils.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sp_utils.c b/src/sp_utils.c
index 8dbd14e..1b707d0 100644
--- a/src/sp_utils.c
+++ b/src/sp_utils.c
@@ -79,7 +79,7 @@ static int construct_filename(char* filename, const char* folder,
79 return 0; 79 return 0;
80} 80}
81 81
82int sp_log_request(const char* folder, const char* text_repr) { 82int sp_log_request(const char* folder, const char* text_repr, char* from) {
83 FILE* file; 83 FILE* file;
84 const char* current_filename = zend_get_executed_filename(TSRMLS_C); 84 const char* current_filename = zend_get_executed_filename(TSRMLS_C);
85 const int current_line = zend_get_executed_lineno(TSRMLS_C); 85 const int current_line = zend_get_executed_lineno(TSRMLS_C);
@@ -100,7 +100,7 @@ int sp_log_request(const char* folder, const char* text_repr) {
100 return -1; 100 return -1;
101 } 101 }
102 102
103 fprintf(file, "RULE: sp.disable_function%s\n", text_repr); 103 fprintf(file, "RULE: sp%s%s\n", from, text_repr);
104 104
105 fprintf(file, "FILE: %s:%d\n", current_filename, current_line); 105 fprintf(file, "FILE: %s:%d\n", current_filename, current_line);
106 for (size_t i = 0; i < (sizeof(zones) / sizeof(zones[0])) - 1; i++) { 106 for (size_t i = 0; i < (sizeof(zones) / sizeof(zones[0])) - 1; i++) {
@@ -225,7 +225,7 @@ void sp_log_disable(const char* restrict path, const char* restrict arg_name,
225 } 225 }
226 } 226 }
227 if (dump) { 227 if (dump) {
228 sp_log_request(config_node->dump, config_node->textual_representation); 228 sp_log_request(config_node->dump, config_node->textual_representation, SP_TOKEN_DISABLE_FUNC);
229 } 229 }
230} 230}
231 231
@@ -252,7 +252,7 @@ void sp_log_disable_ret(const char* restrict path,
252 zend_get_executed_lineno(TSRMLS_C), ret_value ? ret_value : "?", path); 252 zend_get_executed_lineno(TSRMLS_C), ret_value ? ret_value : "?", path);
253 } 253 }
254 if (dump) { 254 if (dump) {
255 sp_log_request(dump, config_node->textual_representation); 255 sp_log_request(dump, config_node->textual_representation, SP_TOKEN_DISABLE_FUNC);
256 } 256 }
257} 257}
258 258