mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-01 05:12:37 +00:00
reformat code.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6984 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
4c47473782
commit
87eaf2b892
@ -136,7 +136,7 @@ static switch_status_t vm_execute_sql(vm_profile_t *profile, char *sql, switch_m
|
|||||||
switch_core_db_close(db);
|
switch_core_db_close(db);
|
||||||
}
|
}
|
||||||
|
|
||||||
end:
|
end:
|
||||||
if (mutex) {
|
if (mutex) {
|
||||||
switch_mutex_unlock(mutex);
|
switch_mutex_unlock(mutex);
|
||||||
}
|
}
|
||||||
@ -180,7 +180,7 @@ static switch_bool_t vm_execute_sql_callback(vm_profile_t *profile,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
end:
|
end:
|
||||||
if (mutex) {
|
if (mutex) {
|
||||||
switch_mutex_unlock(mutex);
|
switch_mutex_unlock(mutex);
|
||||||
}
|
}
|
||||||
@ -622,7 +622,7 @@ static switch_status_t load_config(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
end:
|
end:
|
||||||
switch_xml_free(xml);
|
switch_xml_free(xml);
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -877,7 +877,7 @@ static switch_status_t create_file(switch_core_session_t *session, vm_profile_t
|
|||||||
profile->save_file_key,
|
profile->save_file_key,
|
||||||
profile->record_file_key);
|
profile->record_file_key);
|
||||||
|
|
||||||
record_file:
|
record_file:
|
||||||
args.input_callback = cancel_on_dtmf;
|
args.input_callback = cancel_on_dtmf;
|
||||||
TRY_CODE(switch_ivr_phrase_macro(session, macro_name, NULL, NULL, NULL));
|
TRY_CODE(switch_ivr_phrase_macro(session, macro_name, NULL, NULL, NULL));
|
||||||
TRY_CODE(switch_ivr_gentones(session, profile->tone_spec, 0, NULL));
|
TRY_CODE(switch_ivr_gentones(session, profile->tone_spec, 0, NULL));
|
||||||
@ -890,7 +890,7 @@ static switch_status_t create_file(switch_core_session_t *session, vm_profile_t
|
|||||||
*message_len = fh.sample_count / read_codec->implementation->actual_samples_per_second;
|
*message_len = fh.sample_count / read_codec->implementation->actual_samples_per_second;
|
||||||
status = SWITCH_STATUS_SUCCESS;
|
status = SWITCH_STATUS_SUCCESS;
|
||||||
|
|
||||||
play_file:
|
play_file:
|
||||||
memset(&fh, 0, sizeof(fh));
|
memset(&fh, 0, sizeof(fh));
|
||||||
args.input_callback = control_playback;
|
args.input_callback = control_playback;
|
||||||
memset(&cc, 0, sizeof(cc));
|
memset(&cc, 0, sizeof(cc));
|
||||||
@ -921,7 +921,7 @@ static switch_status_t create_file(switch_core_session_t *session, vm_profile_t
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
end:
|
end:
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1049,7 +1049,7 @@ static switch_status_t listen_file(switch_core_session_t *session, vm_profile_t
|
|||||||
if (!*cc.buf) {
|
if (!*cc.buf) {
|
||||||
TRY_CODE(switch_ivr_phrase_macro(session, VM_SAY_DATE_MACRO, cbt->created_epoch, NULL, &args));
|
TRY_CODE(switch_ivr_phrase_macro(session, VM_SAY_DATE_MACRO, cbt->created_epoch, NULL, &args));
|
||||||
}
|
}
|
||||||
play_file:
|
play_file:
|
||||||
|
|
||||||
if (!*cc.buf) {
|
if (!*cc.buf) {
|
||||||
memset(&fh, 0, sizeof(fh));
|
memset(&fh, 0, sizeof(fh));
|
||||||
@ -1198,7 +1198,7 @@ static switch_status_t listen_file(switch_core_session_t *session, vm_profile_t
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@ -1244,7 +1244,7 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
|
|||||||
switch_ivr_sleep(session, 100);
|
switch_ivr_sleep(session, 100);
|
||||||
|
|
||||||
switch(vm_check_state) {
|
switch(vm_check_state) {
|
||||||
case VM_CHECK_START:
|
case VM_CHECK_START:
|
||||||
{
|
{
|
||||||
total_new_messages = 0;
|
total_new_messages = 0;
|
||||||
total_saved_messages = 0;
|
total_saved_messages = 0;
|
||||||
@ -1264,7 +1264,7 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
|
|||||||
x_user = x_domain = x_domain_root = NULL;
|
x_user = x_domain = x_domain_root = NULL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case VM_CHECK_FOLDER_SUMMARY:
|
case VM_CHECK_FOLDER_SUMMARY:
|
||||||
{
|
{
|
||||||
int informed = 0;
|
int informed = 0;
|
||||||
char msg_count[80] = "";
|
char msg_count[80] = "";
|
||||||
@ -1319,7 +1319,7 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
|
|||||||
vm_check_state = VM_CHECK_MENU;
|
vm_check_state = VM_CHECK_MENU;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case VM_CHECK_PLAY_MESSAGES:
|
case VM_CHECK_PLAY_MESSAGES:
|
||||||
{
|
{
|
||||||
listen_callback_t cbt;
|
listen_callback_t cbt;
|
||||||
char sql[256];
|
char sql[256];
|
||||||
@ -1331,7 +1331,7 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
|
|||||||
memset(&cbt, 0, sizeof(cbt));
|
memset(&cbt, 0, sizeof(cbt));
|
||||||
cbt.email = email_vm;
|
cbt.email = email_vm;
|
||||||
switch(play_msg_type) {
|
switch(play_msg_type) {
|
||||||
case MSG_NEW:
|
case MSG_NEW:
|
||||||
{
|
{
|
||||||
switch_snprintf(sql, sizeof(sql),
|
switch_snprintf(sql, sizeof(sql),
|
||||||
"select * from voicemail_data where user='%s' and domain='%s' and read_epoch=0 order by read_flags", myid, domain_name);
|
"select * from voicemail_data where user='%s' and domain='%s' and read_epoch=0 order by read_flags", myid, domain_name);
|
||||||
@ -1339,8 +1339,8 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
|
|||||||
heard_auto_new = heard_auto_saved = 1;
|
heard_auto_new = heard_auto_saved = 1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MSG_SAVED:
|
case MSG_SAVED:
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
switch_snprintf(sql, sizeof(sql),
|
switch_snprintf(sql, sizeof(sql),
|
||||||
"select * from voicemail_data where user='%s' and domain='%s' and read_epoch !=0 order by read_flags", myid, domain_name);
|
"select * from voicemail_data where user='%s' and domain='%s' and read_epoch !=0 order by read_flags", myid, domain_name);
|
||||||
@ -1388,7 +1388,7 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case VM_CHECK_CONFIG:
|
case VM_CHECK_CONFIG:
|
||||||
{
|
{
|
||||||
char *sql = NULL;
|
char *sql = NULL;
|
||||||
char input[10] = "";
|
char input[10] = "";
|
||||||
@ -1482,7 +1482,7 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case VM_CHECK_MENU:
|
case VM_CHECK_MENU:
|
||||||
{
|
{
|
||||||
char input[10] = "";
|
char input[10] = "";
|
||||||
char key_buf[80] = "";
|
char key_buf[80] = "";
|
||||||
@ -1517,7 +1517,7 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case VM_CHECK_AUTH:
|
case VM_CHECK_AUTH:
|
||||||
{
|
{
|
||||||
if (!attempts) {
|
if (!attempts) {
|
||||||
failed = 1;
|
failed = 1;
|
||||||
@ -1630,19 +1630,19 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
|
|||||||
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
failed:
|
failed:
|
||||||
status = switch_ivr_phrase_macro(session, VM_FAIL_AUTH_MACRO, NULL, NULL, NULL);
|
status = switch_ivr_phrase_macro(session, VM_FAIL_AUTH_MACRO, NULL, NULL, NULL);
|
||||||
myid = id;
|
myid = id;
|
||||||
mypass = NULL;
|
mypass = NULL;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
|
||||||
if (switch_channel_ready(channel)) {
|
if (switch_channel_ready(channel)) {
|
||||||
if (failed) {
|
if (failed) {
|
||||||
@ -1781,7 +1781,7 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, cons
|
|||||||
greet_path = cbt.greeting_path;
|
greet_path = cbt.greeting_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
greet:
|
greet:
|
||||||
memset(buf, 0, sizeof(buf));
|
memset(buf, 0, sizeof(buf));
|
||||||
args.input_callback = cancel_on_dtmf;
|
args.input_callback = cancel_on_dtmf;
|
||||||
args.buf = buf;
|
args.buf = buf;
|
||||||
@ -1895,7 +1895,7 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, cons
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
|
||||||
if (send_mail && !switch_strlen_zero(email_vm)) {
|
if (send_mail && !switch_strlen_zero(email_vm)) {
|
||||||
switch_event_t *event;
|
switch_event_t *event;
|
||||||
@ -2683,7 +2683,7 @@ SWITCH_STANDARD_API(voicemail_api_function)
|
|||||||
|
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
if (host) {
|
if (host) {
|
||||||
if (!ct) {
|
if (!ct) {
|
||||||
stream->write_function(stream, "Content-type: text/html\n\n<h2>");
|
stream->write_function(stream, "Content-type: text/html\n\n<h2>");
|
||||||
@ -2691,7 +2691,7 @@ SWITCH_STANDARD_API(voicemail_api_function)
|
|||||||
}
|
}
|
||||||
stream->write_function(stream, "Error: %s\n", VOICEMAIL_SYNTAX);
|
stream->write_function(stream, "Error: %s\n", VOICEMAIL_SYNTAX);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
switch_safe_free(mydata);
|
switch_safe_free(mydata);
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user