diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-08-13 04:30:26 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-08-13 04:30:26 +0000 |
commit | e7fea90327419214531371543662056c1398470d (patch) | |
tree | 8b7642b5cac62994ff55f80e733dedbff22105bf /modules/xmlrpc/xmlrpcs.inc | |
parent | 3836a33d1c210a806c13f9bb172724394fb3fd80 (diff) | |
download | ampache-e7fea90327419214531371543662056c1398470d.tar.gz ampache-e7fea90327419214531371543662056c1398470d.tar.bz2 ampache-e7fea90327419214531371543662056c1398470d.zip |
new mpd mojo from rosensama and rperkins
Diffstat (limited to 'modules/xmlrpc/xmlrpcs.inc')
-rwxr-xr-x | modules/xmlrpc/xmlrpcs.inc | 49 |
1 files changed, 31 insertions, 18 deletions
diff --git a/modules/xmlrpc/xmlrpcs.inc b/modules/xmlrpc/xmlrpcs.inc index c361fe39..080fcd3e 100755 --- a/modules/xmlrpc/xmlrpcs.inc +++ b/modules/xmlrpc/xmlrpcs.inc @@ -374,10 +374,13 @@ $parser = xml_parser_create($xmlrpc_defencoding); $_xh[$parser]=array(); - $_xh[$parser]['st']=''; - $_xh[$parser]['cm']=0; + //$_xh[$parser]['st']=''; + //$_xh[$parser]['cm']=0; $_xh[$parser]['isf']=0; + $_xh[$parser]['isf_reason']=''; $_xh[$parser]['params']=array(); + $_xh[$parser]['stack']=array(); + $_xh[$parser]['valuestack'] = array(); $_xh[$parser]['method']=''; // decompose incoming XML into request structure @@ -401,35 +404,45 @@ xml_parser_free($parser); } else + if ($_xh[$parser]['isf']) { xml_parser_free($parser); + $r=new xmlrpcresp(0, + $xmlrpcerr['invalid_request'], + $xmlrpcstr['invalid_request'] . ' ' . $_xh[$parser]['isf_reason']); + } + else + { + xml_parser_free($parser); + $m=new xmlrpcmsg($_xh[$parser]['method']); // now add parameters in $plist=''; - $allOK = 1; + //$allOK = 1; for($i=0; $i<sizeof($_xh[$parser]['params']); $i++) { //print "<!-- " . $_xh[$parser]['params'][$i]. "-->\n"; $plist.="$i - " . $_xh[$parser]['params'][$i]. ";\n"; - $allOK = 0; - @eval('$m->addParam(' . $_xh[$parser]['params'][$i]. '); $allOK=1;'); - if (!$allOK) - { - break; - } + //$allOK = 0; + //@eval('$m->addParam(' . $_xh[$parser]['params'][$i]. '); $allOK=1;'); + @$m->addParam($_xh[$parser]['params'][$i]); + //if (!$allOK) + //{ + // break; + //} } // uncomment this to really see what the server's getting! // xmlrpc_debugmsg($plist); - if (!$allOK) - { - $r = new xmlrpcresp(0, - $xmlrpcerr['incorrect_params'], - $xmlrpcstr['incorrect_params'] . ": xml error in param " . $i); - } - else - { + //if (!$allOK) + //{ + // $r = new xmlrpcresp(0, + // $xmlrpcerr['incorrect_params'], + // $xmlrpcstr['incorrect_params'] . ": xml error in param " . $i); + //} + //else + //{ $r = $this->execute($m); - } + //} } return $r; } |