This repository was archived by the owner on Aug 24, 2021. It is now read-only.
File tree 3 files changed +14
-1
lines changed
3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ if test "$PHP_XMLRPC" = "yes"; then
87
87
-I@ext_srcdir@/libxmlrpc -DVERSION="0.50")
88
88
PHP_ADD_BUILD_DIR($ext_builddir/libxmlrpc)
89
89
XMLRPC_MODULE_TYPE=builtin
90
+ AC_DEFINE ( HAVE_XMLRPC_BUNDLED , 1 , [ ] )
90
91
91
92
elif test "$PHP_XMLRPC" != "no"; then
92
93
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ if (PHP_XMLRPC != "no") {
12
12
ADD_SOURCES ( configure_module_dirname + "/libxmlrpc" , "base64.c simplestring.c xml_to_dandarpc.c \
13
13
xmlrpc_introspection.c encodings.c system_methods.c xml_to_xmlrpc.c \
14
14
queue.c xml_element.c xmlrpc.c xml_to_soap.c" , "xmlrpc" ) ;
15
-
15
+ AC_DEFINE ( "HAVE_XMLRPC_BUNDLED" , 1 ) ;
16
16
} else {
17
17
WARNING ( "xmlrpc support can't be enabled, libraries or headers are missing" )
18
18
PHP_XMLRPC = "no" ;
Original file line number Diff line number Diff line change @@ -695,7 +695,11 @@ PHP_FUNCTION(xmlrpc_encode_request)
695
695
outBuf = XMLRPC_REQUEST_ToXML (xRequest , 0 );
696
696
if (outBuf ) {
697
697
RETVAL_STRING (outBuf );
698
+ #ifdef HAVE_XMLRPC_BUNDLED
698
699
efree (outBuf );
700
+ #else
701
+ free (outBuf );
702
+ #endif
699
703
}
700
704
XMLRPC_RequestFree (xRequest , 1 );
701
705
}
@@ -729,7 +733,11 @@ PHP_FUNCTION(xmlrpc_encode)
729
733
if (xOut ) {
730
734
if (outBuf ) {
731
735
RETVAL_STRING (outBuf );
736
+ #ifdef HAVE_XMLRPC_BUNDLED
732
737
efree (outBuf );
738
+ #else
739
+ free (outBuf );
740
+ #endif
733
741
}
734
742
/* cleanup */
735
743
XMLRPC_CleanupValue (xOut );
@@ -1092,7 +1100,11 @@ PHP_FUNCTION(xmlrpc_server_call_method)
1092
1100
outBuf = XMLRPC_REQUEST_ToXML (xResponse , & buf_len );
1093
1101
if (outBuf ) {
1094
1102
RETVAL_STRINGL (outBuf , buf_len );
1103
+ #ifdef HAVE_XMLRPC_BUNDLED
1095
1104
efree (outBuf );
1105
+ #else
1106
+ free (outBuf );
1107
+ #endif
1096
1108
}
1097
1109
/* cleanup after ourselves. what a sty! */
1098
1110
XMLRPC_RequestFree (xResponse , 0 );
You can’t perform that action at this time.
0 commit comments