[ejabberd] strange registration error

Brian Cully bcully at gmail.com
Thu Nov 12 18:03:31 MSK 2009


On 12-Nov-2009, at 01:48, Jan Koum wrote:
> On Mon, Oct 26, 2009 at 11:21 AM, Jan Koum <jan.koum at gmail.com> wrote:
> on freebsd i am using jot(1) -- seems to work so far:
> 
> # common control function
> RANDOM=`jot -r 1 1 100`
> ctl ()
> {
>     COMMAND=$@
>     $EXEC_CMD "$ERL \
>       $NAME ctl-${RANDOM}-${ERLANG_NODE} \
> 
> -- yan
> 
> 
> LOL, looks like a random number between 1 and 100 is NOT enough for me:
> 
> Nov 11 20:51:51 im101 last message repeated 8 times
> Nov 11 20:52:09 im101 last message repeated 5 times
> Nov 11 20:52:10 im101 epmd: epmd: node name already occupied ctl-46-ejabberd
> Nov 11 20:52:10 im101 epmd: epmd: epmd running - daemon = 1
> Nov 11 20:52:38 im101 last message repeated 7 times
> Nov 11 20:53:21 im101 last message repeated 12 times

	This is over-engineered. Just use the pid of the shell process with $$. It's guaranteed to be unique at the time of call.

-bjc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20091112/1338cc33/attachment.html>


More information about the ejabberd mailing list