FS-4453 --resolve this will now cause up to a 20 second timeout waiting for the response and the call will be blocking

This commit is contained in:
Anthony Minessale committed 2012-07-24 13:45:10 -05:00
1 parent 7f525d5ca9
commit d832b5dfef
6 files changed
+60 -12

No files matched your search

@@ -7764,7 +7764,7 @@ static switch_status_t chat_send(switch_event_t *message_event)
}
if (!(conference = conference_find(name, NULL))) {
switch_core_chat_send_args(proto, CONF_CHAT_PROTO, to, hint && strchr(hint, '/') ? hint : from, "", "Conference not active.", NULL, NULL);
switch_core_chat_send_args(proto, CONF_CHAT_PROTO, to, hint && strchr(hint, '/') ? hint : from, "", "Conference not active.", NULL, NULL, SWITCH_FALSE);
return SWITCH_STATUS_FALSE;
}
@@ -7782,7 +7782,7 @@ static switch_status_t chat_send(switch_event_t *message_event)
switch_safe_free(lbuf);
switch_core_chat_send_args(proto, CONF_CHAT_PROTO, to, hint && strchr(hint, '/') ? hint : from, "", stream.data, NULL, NULL);
switch_core_chat_send_args(proto, CONF_CHAT_PROTO, to, hint && strchr(hint, '/') ? hint : from, "", stream.data, NULL, NULL, SWITCH_FALSE);
switch_safe_free(stream.data);
switch_thread_rwlock_unlock(conference->rwlock);
@@ -1720,7 +1720,7 @@ SWITCH_STANDARD_API(chat_api_function)
if (!zstr(cmd) && (lbuf = strdup(cmd))
&& (argc = switch_separate_string(lbuf, '|', argv, (sizeof(argv) / sizeof(argv[0])))) >= 4) {
if (switch_core_chat_send_args(argv[0], "global", argv[1], argv[2], "", argv[3], !zstr(argv[4]) ? argv[4] : NULL, "") == SWITCH_STATUS_SUCCESS) {
if (switch_core_chat_send_args(argv[0], "global", argv[1], argv[2], "", argv[3], !zstr(argv[4]) ? argv[4] : NULL, "", SWITCH_TRUE) == SWITCH_STATUS_SUCCESS) {
stream->write_function(stream, "Sent");
} else {
stream->write_function(stream, "Error! Message Not Sent");
@@ -4105,7 +4105,7 @@ static switch_status_t api_chat_send(switch_event_t *message_event)
switch_api_execute(cmd, arg, NULL, &stream);
if (proto) {
switch_core_chat_send_args(proto, "api", to, hint && strchr(hint, '/') ? hint : from, !zstr(type) ? type : NULL, (char *) stream.data, NULL, NULL);
switch_core_chat_send_args(proto, "api", to, hint && strchr(hint, '/') ? hint : from, !zstr(type) ? type : NULL, (char *) stream.data, NULL, NULL, SWITCH_TRUE);
}
switch_safe_free(stream.data);