From 42f139215dba2021e1bd9ab59efa9e359a75a0b9 Mon Sep 17 00:00:00 2001 From: Jeremy Lakeman Date: Mon, 26 Aug 2013 13:16:18 +0930 Subject: [PATCH] Log warning if meshms ply failed to open --- meshms.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/meshms.c b/meshms.c index 8bc839f7..7e8cac88 100644 --- a/meshms.c +++ b/meshms.c @@ -221,8 +221,11 @@ static int ply_read_open(struct ply_read *ply, const char *id, rhizome_manifest DEBUGF("Opening ply %s", id); if (rhizome_retrieve_manifest(id, m)) return -1; - if (rhizome_open_decrypt_read(m, NULL, &ply->read)) - return -1; + int ret = rhizome_open_decrypt_read(m, NULL, &ply->read); + if (ret>0) + WARNF("Payload was not found for manifest %s", alloca_tohex_bid(m->cryptoSignPublic)); + if (ret) + return ret; ply->read.offset = ply->read.length = m->fileLength; return 0; }