char *password;
char *server;
char *status_msg;
+ char *priority;
uint16_t port;
int features;
int counter;
static int on_result(void *user_data, ikspak *pak)
{
ldl_handle_t *handle = user_data;
- iks *msg, *ctag;
+ iks *msg, *ctag, *tag;
if ((msg = iks_make_pres (IKS_SHOW_AVAILABLE, handle->status_msg))) {
ctag = iks_insert(msg, "c");
iks_insert_attrib(ctag, "client", "libdingaling");
iks_insert_attrib(ctag, "xmlns", "http://jabber.org/protocol/caps");
+ if (handle->priority && strlen(handle->priority)) {
+ tag = iks_insert (msg, "priority");
+ iks_insert_cdata(tag, handle->priority, 0);
+ }
+
apr_queue_push(handle->queue, msg);
msg = NULL;
}
char *server,
ldl_user_flag_t flags,
char *status_msg,
+ char *priority,
ldl_loop_callback_t loop_callback,
ldl_session_callback_t session_callback,
ldl_response_callback_t response_callback,
new_handle->status_msg = apr_pstrdup(pool, status_msg);
}
+ if (priority) {
+ new_handle->priority = apr_pstrdup(pool, priority);
+ }
+
if (loop_callback) {
new_handle->loop_callback = loop_callback;
}
char *login;
char *password;
char *message;
+ char *priority;
#ifdef AUTO_REPLY
char *auto_reply;
#endif
profile->login,
profile->password,
profile->server,
- profile->user_flags, profile->message, handle_loop, handle_signalling, handle_response, profile) == LDL_STATUS_SUCCESS) {
+ profile->user_flags, profile->message, profile->priority, handle_loop, handle_signalling, handle_response, profile) == LDL_STATUS_SUCCESS) {
profile->purge = SWITCH_FALSE;
switch_thread_rwlock_create(&profile->rwlock, module_pool);
profile->name = switch_core_strdup(module_pool, val);
} else if (!strcasecmp(var, "message") && !zstr(val)) {
profile->message = switch_core_strdup(module_pool, val);
+ } else if (!strcasecmp(var, "priority") && !zstr(val)) {
+ profile->priority = switch_core_strdup(module_pool, val);
} else if (!strcasecmp(var, "local-network-acl") && !zstr(val)) {
profile->local_network = switch_core_strdup(module_pool, val);
} else if (!strcasecmp(var, "rtp-ip")) {
(new_profile->password && profile->password && !strcasecmp(new_profile->password, profile->password))) &&
((!new_profile->message && !profile->message) ||
(new_profile->message && profile->message && !strcasecmp(new_profile->message, profile->message))) &&
+ ((!new_profile->priority && !profile->priority) ||
+ (new_profile->priority && profile->priority && !strcasecmp(new_profile->priority, profile->priority))) &&
((!new_profile->avatar && !profile->avatar) || (new_profile->avatar && profile->avatar && !strcasecmp(new_profile->avatar, profile->avatar))) &&
#ifdef AUTO_REPLY
((!new_profile->auto_reply && !profile->auto_reply) ||
switch_set_flag(profile, TFLAG_AUTO);
profile->message = "";
+ profile->priority = "";
profile->user_flags |= LDL_FLAG_COMPONENT;
switch_mutex_init(&profile->mutex, SWITCH_MUTEX_NESTED, module_pool);
switch_snprintf(dbname, sizeof(dbname), "dingaling_%s", profile->name);
switch_set_flag(profile, TFLAG_AUTO);
profile->message = "";
+ profile->priority = "";
profile->user_flags |= LDL_FLAG_COMPONENT;
switch_mutex_init(&profile->mutex, SWITCH_MUTEX_NESTED, module_pool);
switch_snprintf(dbname, sizeof(dbname), "dingaling_%s", profile->name);