diff options
author | Evan Prodromou <evan@prodromou.name> | 2008-06-02 14:12:54 -0400 |
---|---|---|
committer | Evan Prodromou <evan@prodromou.name> | 2008-06-02 14:12:54 -0400 |
commit | 3b9f0e3867f98c1022654ca22ba155369600bddc (patch) | |
tree | a4a82d5d4d981633fd88583a06ea56e20332bb5d /actions | |
parent | 74bec9503281d6a18c8b56b03e57d58ce9c4eddf (diff) |
add some debugging stuff for problems with remote subscribe
darcs-hash:20080602181254-84dde-ac7f4a362754a66facfb06a7b41f9160a0eb5caf.gz
Diffstat (limited to 'actions')
-rw-r--r-- | actions/remotesubscribe.php | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/actions/remotesubscribe.php b/actions/remotesubscribe.php index c2c633c16..f454a1400 100644 --- a/actions/remotesubscribe.php +++ b/actions/remotesubscribe.php @@ -129,23 +129,55 @@ class RemotesubscribeAction extends Action { # XXX: the following code could probably be refactored to eliminate dupes + common_debug('remotesubscribe.php - looking for oauth discovery service'); + $oauth_service = $xrds->services(omb_service_filter(OAUTH_DISCOVERY)); if (!$oauth_service) { + common_debug('remotesubscribe.php - failed to find oauth discovery service'); return NULL; } + common_debug('remotesubscribe.php - looking for oauth discovery XRD'); + $xrd = $this->getXRD($oauth_service, $xrds); - $this->addServices($xrd, $oauth_endpoints, $omb); + + if (!$xrd) { + common_debug('remotesubscribe.php - failed to find oauth discovery XRD'); + return NULL; + } + + common_debug('remotesubscribe.php - adding OAuth services from XRD'); + + if (!$this->addServices($xrd, $oauth_endpoints, $omb)) { + common_debug('remotesubscribe.php - failed to add OAuth services'); + return NULL; + } + common_debug('remotesubscribe.php - looking for OMB discovery service'); + $omb_service = $xrds->services(omb_service_filter(OMB_NAMESPACE)); if (!$omb_service) { + common_debug('remotesubscribe.php - failed to find OMB discovery service'); return NULL; } + common_debug('remotesubscribe.php - looking for OMB discovery XRD'); + $xrd = $this->getXRD($omb_service, $xrds); - $this->addServices($xrd, $omb_endpoints, $omb); + + if (!$xrd) { + common_debug('remotesubscribe.php - failed to find OMB discovery XRD'); + return NULL; + } + + common_debug('remotesubscribe.php - adding OMB services from XRD'); + + if (!$this->addServices($xrd, $omb_endpoints, $omb)) { + common_debug('remotesubscribe.php - failed to add OMB services'); + return NULL; + } # XXX: check that we got all the services we needed |