From 0ddfdce6a4c83278a481a07916bc11240fc4b6d0 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Sun, 10 Oct 2010 16:16:29 -0700 Subject: make it much easier to debug friend acceptance issues by reporting specific error conditions across the wire. --- boot.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index 8e42c5fad..640c0199f 100644 --- a/boot.php +++ b/boot.php @@ -500,14 +500,18 @@ function goaway($s) { }} // Generic XML return -// Outputs a basic XML status structure to STDOUT, with a value variable -// of $st and terminates the current process. +// Outputs a basic dfrn XML status structure to STDOUT, with a variable +// of $st and an optional text of $message and terminates the current process. if(! function_exists('xml_status')) { -function xml_status($st) { +function xml_status($st, $message = '') { + + if(strlen($message)) + $xml_message = "\t" . xmlify($message) . "\r\n"; + header( "Content-type: text/xml" ); echo ''."\r\n"; - echo "$st\r\n"; + echo "\r\n\t$st\r\n$xml_message\r\n"; killme(); }} -- cgit v1.2.3