From 10ae6900b4f77f574d779817f32475c7efdf1ab2 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Sat, 7 Apr 2007 21:14:21 +0000 Subject: [PATCH] merge 2 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4886 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/libdingaling/src/libdingaling.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libs/libdingaling/src/libdingaling.c b/libs/libdingaling/src/libdingaling.c index 8c4622ed0d..22056868ab 100644 --- a/libs/libdingaling/src/libdingaling.c +++ b/libs/libdingaling/src/libdingaling.c @@ -1870,18 +1870,19 @@ char *ldl_handle_probe(ldl_handle_t *handle, char *id, char *from, char *buf, un apr_hash_set(handle->probe_hash, id, APR_HASH_KEY_STRING, &buffer); - msg = iks_make_s10n (IKS_TYPE_SUBSCRIBE, id, notice); - iks_insert_attrib(msg, "from", from); - apr_queue_push(handle->queue, msg); - started = time(NULL); for(;;) { elapsed = time(NULL) - started; if (elapsed == next) { + msg = iks_make_s10n (IKS_TYPE_SUBSCRIBE, id, notice); + iks_insert_attrib(msg, "from", from); + apr_queue_push(handle->queue, msg); + pres = iks_new("presence"); + iks_insert_attrib(pres, "xmlns", "jabber:client"); iks_insert_attrib(pres, "type", "probe"); - iks_insert_attrib(pres, "from", from); iks_insert_attrib(pres, "to", id); + iks_insert_attrib(pres, "from", from); apr_queue_push(handle->queue, pres); next += 5; }