From: Ruben d'Arco Date: Mon, 30 Apr 2012 06:15:12 +0000 (+0200) Subject: Guardian->instance communication cleand up, with terminating character \0 X-Git-Tag: rec-3.6.0-rc1~550^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=188b28bd9c770cede73b0a2b33d9c2fc22f951cc;p=thirdparty%2Fpdns.git Guardian->instance communication cleand up, with terminating character \0 --- diff --git a/pdns/dynlistener.cc b/pdns/dynlistener.cc index c2a2d0dbe3..2b4929b118 100755 --- a/pdns/dynlistener.cc +++ b/pdns/dynlistener.cc @@ -271,7 +271,8 @@ void DynListener::sendLine(const string &l) string line=l; if(!line.empty() && line[line.length()-1]!='\n') line.append("\n"); - line.append("\n"); + line.append(1, '\0'); + line.append(1, '\n'); if((unsigned int)write(1,line.c_str(),line.length()) != line.length()) L<&parts, pid_t ppid) char mesg[512]; string response; while(fgets(mesg,sizeof(mesg),g_fp)) { - if(*mesg=='\n') + if(*mesg=='\0') break; response+=mesg; }