forked from olegfedoseev/pinba-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpinba_extension.patch
47 lines (40 loc) · 2.07 KB
/
pinba_extension.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Common subdirectories: pinba_extension_orig/.git and pinba_extension/.git
diff -uN pinba_extension_orig/pinba.c pinba_extension/pinba.c
--- pinba_extension_orig/pinba.c 2015-03-20 12:45:01.447588232 +0300
+++ pinba_extension/pinba.c 2015-03-20 12:46:21.112388153 +0300
@@ -567,7 +567,7 @@
} else if (client->script_name) {
request->script_name = strdup(client->script_name);
} else {
- request->script_name = _pinba_fetch_global_var("SCRIPT_NAME", sizeof("SCRIPT_NAME") TSRMLS_CC);
+ request->script_name = _pinba_fetch_global_var("SCRIPT_FILENAME", sizeof("SCRIPT_FILENAME") TSRMLS_CC);
}
tags = &client->tags;
@@ -643,7 +643,7 @@
} else if (PINBA_G(script_name)) {
request->script_name = strdup(PINBA_G(script_name));
} else {
- request->script_name = _pinba_fetch_global_var("SCRIPT_NAME", sizeof("SCRIPT_NAME") TSRMLS_CC);
+ request->script_name = _pinba_fetch_global_var("SCRIPT_FILENAME", sizeof("SCRIPT_FILENAME") TSRMLS_CC);
}
tags = &PINBA_G(tags);
@@ -888,7 +888,6 @@
sent = sendto(collector->fd, data, data_len, 0, (struct sockaddr *) &collector->sockaddr, collector->sockaddr_len);
if (sent < data_len) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed to send data to Pinba server: %s", strerror(errno));
ret = FAILURE;
}
}
@@ -2504,7 +2503,7 @@
zend_is_auto_global("_SERVER", sizeof("_SERVER") - 1 TSRMLS_CC);
#endif
- if (PG(http_globals)[TRACK_VARS_SERVER] && zend_hash_find(HASH_OF(PG(http_globals)[TRACK_VARS_SERVER]), "SCRIPT_NAME", sizeof("SCRIPT_NAME"), (void **) &tmp) != FAILURE && Z_TYPE_PP(tmp) == IS_STRING && Z_STRLEN_PP(tmp) > 0) {
+ if (PG(http_globals)[TRACK_VARS_SERVER] && zend_hash_find(HASH_OF(PG(http_globals)[TRACK_VARS_SERVER]), "SCRIPT_FILENAME", sizeof("SCRIPT_FILENAME"), (void **) &tmp) != FAILURE && Z_TYPE_PP(tmp) == IS_STRING && Z_STRLEN_PP(tmp) > 0) {
PINBA_G(script_name) = estrndup(Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp));
}
@@ -2561,7 +2560,6 @@
php_info_print_table_row(2, "Extension version", PHP_PINBA_VERSION);
php_info_print_table_end();
- DISPLAY_INI_ENTRIES();
}
/* }}} */