You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2014/08/01 11:06:23 UTC

[47/49] chttpd commit: updated refs/heads/windsor-merge to 554ef74

Log unexpected return value from att data fetch

BugzID: 30891


Project: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/commit/5e2f7c3c
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/5e2f7c3c
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/5e2f7c3c

Branch: refs/heads/windsor-merge
Commit: 5e2f7c3ceba8ad3d355ea02cb0fc2c64e74f0fe6
Parents: 07c2603
Author: Adam Kocoloski <ad...@cloudant.com>
Authored: Mon May 19 16:52:01 2014 -0400
Committer: Robert Newson <rn...@apache.org>
Committed: Thu Jul 31 11:55:11 2014 +0100

----------------------------------------------------------------------
 src/chttpd_db.erl | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/5e2f7c3c/src/chttpd_db.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_db.erl b/src/chttpd_db.erl
index f831389..c1a3297 100644
--- a/src/chttpd_db.erl
+++ b/src/chttpd_db.erl
@@ -1363,8 +1363,13 @@ validate_attachment_name(Name) ->
 monitor_attachments(Atts) when is_list(Atts) ->
     lists:foldl(fun(Att, Monitors) ->
         case couch_att:fetch(data, Att) of
-            {Fd, _} -> [monitor(process, Fd) | Monitors];
-            _ -> Monitors
+            {Fd, _} ->
+                [monitor(process, Fd) | Monitors];
+            stub ->
+                Monitors;
+            Else ->
+                ?LOG_ERROR("~p from couch_att:fetch(data, ~p)", [Else, Att]),
+                Monitors
         end
     end, [], Atts);
 monitor_attachments(Att) ->