diff --git a/tools/daemon/smud_connections.cpp b/tools/daemon/smud_connections.cpp index e401e607..80316bd7 100644 --- a/tools/daemon/smud_connections.cpp +++ b/tools/daemon/smud_connections.cpp @@ -283,12 +283,18 @@ MD5Status ConnectionPool::GetMD5UpdateStatus( const char *md5 , smud_connection } char filename[100]; - fgets(filename, sizeof(filename), file); - if (filename[strlen(filename)-1] == '\n') + filename[0] = '\n'; + + while (filename[0] == '\n') { - filename[strlen(filename)-1] = '\0'; + fgets(filename, sizeof(filename), file); + if (filename[strlen(filename)-1] == '\n') + { + filename[strlen(filename)-1] = '\0'; + } } + printf("Filename is %s\n", filename); //We now need to match this filename with one of our mmap'd files in memory and store it until send gets called.