[AGENT++] fopen(..."r"...) vs. fopen(..."rb"...)

Frank Fock fock at agentpp.com
Thu Aug 11 19:36:04 CEST 2005


Hi Chuck,

thanks for reporting that one. If I remember it right, we had already 
this issue
a "few" years ago. It seems that it need to be fixed again :-(

Best regards,
Frank

Chuck Bueche wrote:

>I've found what appears to be a fix for a problem I was having with
>MibEntry::load_from_file() and MibEntry::save_to_file() under Win32.
>
>Those functions use "r" and "w" access methods passed to fopen(), which will
>perform text processing on the files.  Since the files are being saved in a
>binary (encrypted?) form, text processing is dropping needed data.  Changing
>the fopen() parameters to "rb" and "wb" has fixed the problem.
>
>I see that there are several fopen() calls in the libraries that might
>benefit from such a modification.
>
>Thanks,
>Chuck Bueche
>Craniac, Inc.
>
>_______________________________________________
>AGENTPP mailing list
>AGENTPP at agentpp.org
>http://lists.agentpp.org/mailman/listinfo/agentpp
>
>
>  
>


-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com





More information about the AGENTPP mailing list