summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2007-12-29 21:15:42 (UTC)
committer Michael Krelin <hacker@klever.net>2008-01-04 18:21:55 (UTC)
commit3801123163d78896a05fb26323deb7c0fa8c7f8e (patch) (unidiff)
tree96ff115b07235e4ce66d5de8e9e9338d388696d8
parentd81fa443c048d6919e98e82fff1fe6013c9deff4 (diff)
downloadlibopkele-3801123163d78896a05fb26323deb7c0fa8c7f8e.zip
libopkele-3801123163d78896a05fb26323deb7c0fa8c7f8e.tar.gz
libopkele-3801123163d78896a05fb26323deb7c0fa8c7f8e.tar.bz2
make ./test/idiscover show expiration data
Signed-off-by: Michael Krelin <hacker@klever.net>
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--test/idiscover.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/idiscover.cc b/test/idiscover.cc
index 05cbcae..873da12 100644
--- a/test/idiscover.cc
+++ b/test/idiscover.cc
@@ -33,14 +33,16 @@ int main(int argc,char **argv) {
33 opkele::idiscovery_t discovery(argv[a]); 33 opkele::idiscovery_t discovery(argv[a]);
34 clog 34 clog
35 << "===============================================================" << endl 35 << "===============================================================" << endl
36 << "User-supplied ID: " << argv[a] << endl 36 << "User-supplied ID: " << argv[a] << endl
37 << "Normalized ID: " << discovery.normalized_id << endl 37 << "Normalized ID: " << discovery.normalized_id << endl
38 << "Canonicalized ID: " << discovery.canonicalized_id << endl 38 << "Canonicalized ID: " << discovery.canonicalized_id << endl
39 << "The identity is " << (discovery.xri_identity?"":"not ") << "an i-name" << endl 39 << "The identity is " << (discovery.xri_identity?"":"not ") << "an i-name" << endl;
40 << endl 40 if(discovery.xrd.expires)
41 clog << "Information expires in " << discovery.xrd.expires-time(0) << " seconds" << endl;
42 clog << endl
41 << "CanonicalID: " << discovery.xrd.canonical_ids << endl 43 << "CanonicalID: " << discovery.xrd.canonical_ids << endl
42 << "LocalID: " << discovery.xrd.local_ids << endl 44 << "LocalID: " << discovery.xrd.local_ids << endl
43 << "Services: " << discovery.xrd.services << endl; 45 << "Services: " << discovery.xrd.services << endl;
44 } 46 }
45 }catch(exception& e) { 47 }catch(exception& e) {
46 cerr << "oops: " << e.what() << endl; 48 cerr << "oops: " << e.what() << endl;