Permalink
Browse files

cleaning getmore

  • Loading branch information...
1 parent 20dfe3e commit b1a62743d1ab7f1986bbe7faf36640fc16236b15 @dwight dwight committed Jul 15, 2011
Showing with 2 additions and 8 deletions.
  1. +2 −8 db/ops/query.cpp
View
@@ -92,21 +92,15 @@ namespace mongo {
ClientCursor::Pointer p(cursorid);
ClientCursor *cc = p.c();
- int bufSize = 512;
- if ( cc ) {
- bufSize += sizeof( QueryResult );
- bufSize += MaxBytesToReturnToClientAtOnce;
- }
+ int bufSize = 512 + sizeof( QueryResult ) + MaxBytesToReturnToClientAtOnce;
BufBuilder b( bufSize );
-
b.skip(sizeof(QueryResult));
-
int resultFlags = ResultFlag_AwaitCapable;
int start = 0;
int n = 0;
- if ( !cc ) {
+ _IF ( !cc ) {
log() << "getMore: cursorid not found " << ns << " " << cursorid << endl;
cursorid = 0;
resultFlags = ResultFlag_CursorNotFound;

0 comments on commit b1a6274

Please sign in to comment.