"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/testparsefile.cpp" between
muscle8.20.zip and muscle8.30.zip

About: MUSCLE (Multi User Server Client Linking Environment) is a messaging server and networking API. The included server program ("muscled") lets its clients message each other, and/or store information in its serverside hierarchical database.

testparsefile.cpp  (muscle8.20):testparsefile.cpp  (muscle8.30)
skipping to change at line 63 skipping to change at line 63
if ((fileLen >= 0)&&(bb.SetNumBytes((uint32)fileLen, false).IsOK( ))&&(fdio.ReadFully(bb.GetBuffer(), fileLen) == fileLen)) if ((fileLen >= 0)&&(bb.SetNumBytes((uint32)fileLen, false).IsOK( ))&&(fdio.ReadFully(bb.GetBuffer(), fileLen) == fileLen))
{ {
const String s((const char *) bb.GetBuffer(), bb.GetNumBytes() ); const String s((const char *) bb.GetBuffer(), bb.GetNumBytes() );
Message msg; Message msg;
if (ParseFile(s, msg).IsOK(ret)) if (ParseFile(s, msg).IsOK(ret))
{ {
LogTime(MUSCLE_LOG_INFO, "Parsed contents of file [%s]:\n", argv[i]); LogTime(MUSCLE_LOG_INFO, "Parsed contents of file [%s]:\n", argv[i]);
msg.PrintToStream(); msg.PrintToStream();
printf("\n"); printf("\n");
const String s = UnparseFile(msg); const String ss = UnparseFile(msg);
printf(" UnparseFile(msg) output is below: -------------\n[ printf(" UnparseFile(msg) output is below: -------------\n[
%s]", s()); %s]", ss());
} }
else LogTime(MUSCLE_LOG_ERROR, "Error parsing file [%s] [%s]\n ", argv[i], ret()); else LogTime(MUSCLE_LOG_ERROR, "Error parsing file [%s] [%s]\n ", argv[i], ret());
} }
else LogTime(MUSCLE_LOG_ERROR, "Unable to read file [%s]\n", argv [i]); else LogTime(MUSCLE_LOG_ERROR, "Unable to read file [%s]\n", argv [i]);
} }
else LogTime(MUSCLE_LOG_ERROR, "Unable to open file [%s] [%s]\n", ar gv[i], B_ERRNO()); else LogTime(MUSCLE_LOG_ERROR, "Unable to open file [%s] [%s]\n", ar gv[i], B_ERRNO());
} }
} }
return 0; return 0;
} }
 End of changes. 1 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)