On Tue, 2012-08-21 at 22:15 -0600, Jeremy Whiting wrote:
> Here's my first stab at adding support for obex 0.47 support to the
> pbap backend.
About the code: SyncEvolution uses RAII. Please avoid plain pointers in
favor of boost or std smart pointers ("+ GDBusCXX::DBusRemoteObject*
m_client;").
+ std::string filename (std::string("/tmp/") + m_address +
".vcf");
Creating temporary files without race conditions and security problems
is a can of worms. Using mkstemp() or tmpfile() is recommended.
In this case, tmpfile() is of not much help because it only gives us a
FILE pointer and thus file descriptor; the man page doesn't say
explicitly, but the file is probably already unlinked.
For mkstemp() you don't get the file name.
Let's do what obexd does and use g_file_open_tmp().
--
Best Regards, Patrick Ohly
The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.
_______________________________________________
SyncEvolution mailing list
[email protected]
http://lists.syncevolution.org/listinfo/syncevolution