Permalink
Browse files

SERVER-14843: Fix mongosniff for decoding messages without a namespace

  • Loading branch information...
1 parent 4774290 commit 5d05a2b0767f2f6122ee509678e0df3fa36f94a7 @markbenvenuto markbenvenuto committed Aug 29, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/mongo/tools/sniffer.cpp
@@ -257,7 +257,7 @@ void got_packet(u_char *args, const struct pcap_pkthdr *header, const u_char *pa
out() << inet_ntoa(ip->ip_src) << ":" << ntohs( tcp->th_sport )
<< ( serverPorts.count( ntohs( tcp->th_dport ) ) ? " -->> " : " <<-- " )
<< inet_ntoa(ip->ip_dst) << ":" << ntohs( tcp->th_dport )
- << " " << d.getns()
+ << " " << (d.messageShouldHaveNs() ? d.getns() : "")
<< " " << m.header().getLen() << " bytes "
<< " id:" << hex << m.header().getId() << dec << "\t" << m.header().getId();

0 comments on commit 5d05a2b

Please sign in to comment.