Commit Graph

5 Commits (7cf7562bb16d9c8be95ca6594ca0c005710ce5d2)

Author SHA1 Message Date
Michael Santos a7717f381e Add compiler hardening flags 9 years ago
Michael Santos a392e836a0 Compile on BSDs
Use uuid_create(3) and uuid_to_string(3) to create the message id on
BSDs. Only tested on FreeBSD but should work on OpenBSD and NetBSD.

Add untested support for compiling on Solaris and Mac OS X:

* SmartOS has libuuid installed by default with rsyslog via pkgsrc

* Mac OS X has libuuid as part of libSystem:

http://lists.apple.com/archives/unix-porting/2009/Aug/msg00006.html
9 years ago
Michael Santos da5fecd041 makefile: static target, link against libresolv
libresolv is required for base64 encoding.
9 years ago
Michael Santos 353951298e Generate a unique ID per message
Add a ID per message. Seems to fix the duplicate messages seen with MUCs
on the Conversations android client whenever the network is switched
(e.g., from wifi to cell).

Introduce a dependency on Linux's libuuid which introduces portability
issues. However, it should be simple to add support for the BSD UUID
interface.

libuuid was used because it is a fast and simple way of generating
a unique id.  Realistically, the ID only needs to be unique within
the MUC and so could probably be replaced with an sprintf() combining
time of day, PID and a random number.
9 years ago
Michael Santos 3d79e9fda8 Forward stdin over XMPP 9 years ago