summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2010-04-09 14:32:24 -0400
committerEliot Horowitz <eliot@10gen.com>2010-04-09 14:32:49 -0400
commitadb8a476bc86dc96a583f45cb0dee21b0c8afd59 (patch)
tree185466ef813241996762890afa3626b434a25a71
parent601f3d44fae113086d110e168ae0ec02925de910 (diff)
downloadmongo-adb8a476bc86dc96a583f45cb0dee21b0c8afd59.tar.gz
client fix for bad queries
-rw-r--r--client/dbclient.cpp2
-rw-r--r--db/dbwebserver.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/client/dbclient.cpp b/client/dbclient.cpp
index d505c9f1d46..7d04866eb2d 100644
--- a/client/dbclient.cpp
+++ b/client/dbclient.cpp
@@ -769,6 +769,8 @@ namespace mongo {
}
if ( !connector->call( toSend, *m, false ) )
return false;
+ if ( ! m->data )
+ return false;
dataReceived();
return true;
}
diff --git a/db/dbwebserver.cpp b/db/dbwebserver.cpp
index fc0be83f086..c55c8a6ab19 100644
--- a/db/dbwebserver.cpp
+++ b/db/dbwebserver.cpp
@@ -522,7 +522,7 @@ namespace mongo {
BSONObj query = queryBuilder.obj();
auto_ptr<DBClientCursor> cursor = db.query( ns.c_str() , query, num , skip );
-
+ uassert( 13085 , "query failed for dbwebserver" , cursor.get() );
if ( one ) {
if ( cursor->more() ) {
BSONObj obj = cursor->next();