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);
|
||||
}
|
||||
|
||||
end:
|
||||
end:
|
||||
if (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) {
|
||||
switch_mutex_unlock(mutex);
|
||||
}
|
||||
|
@ -622,7 +622,7 @@ static switch_status_t load_config(void)
|
|||
}
|
||||
}
|
||||
|
||||
end:
|
||||
end:
|
||||
switch_xml_free(xml);
|
||||
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->record_file_key);
|
||||
|
||||
record_file:
|
||||
record_file:
|
||||
args.input_callback = cancel_on_dtmf;
|
||||
TRY_CODE(switch_ivr_phrase_macro(session, macro_name, NULL, NULL, 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;
|
||||
status = SWITCH_STATUS_SUCCESS;
|
||||
|
||||
play_file:
|
||||
play_file:
|
||||
memset(&fh, 0, sizeof(fh));
|
||||
args.input_callback = control_playback;
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -1049,7 +1049,7 @@ static switch_status_t listen_file(switch_core_session_t *session, vm_profile_t
|
|||
if (!*cc.buf) {
|
||||
TRY_CODE(switch_ivr_phrase_macro(session, VM_SAY_DATE_MACRO, cbt->created_epoch, NULL, &args));
|
||||
}
|
||||
play_file:
|
||||
play_file:
|
||||
|
||||
if (!*cc.buf) {
|
||||
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;
|
||||
}
|
||||
|
@ -1244,7 +1244,7 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
|
|||
switch_ivr_sleep(session, 100);
|
||||
|
||||
switch(vm_check_state) {
|
||||
case VM_CHECK_START:
|
||||
case VM_CHECK_START:
|
||||
{
|
||||
total_new_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;
|
||||
}
|
||||
break;
|
||||
case VM_CHECK_FOLDER_SUMMARY:
|
||||
case VM_CHECK_FOLDER_SUMMARY:
|
||||
{
|
||||
int informed = 0;
|
||||
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;
|
||||
}
|
||||
break;
|
||||
case VM_CHECK_PLAY_MESSAGES:
|
||||
case VM_CHECK_PLAY_MESSAGES:
|
||||
{
|
||||
listen_callback_t cbt;
|
||||
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));
|
||||
cbt.email = email_vm;
|
||||
switch(play_msg_type) {
|
||||
case MSG_NEW:
|
||||
case MSG_NEW:
|
||||
{
|
||||
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);
|
||||
|
@ -1339,8 +1339,8 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
|
|||
heard_auto_new = heard_auto_saved = 1;
|
||||
}
|
||||
break;
|
||||
case MSG_SAVED:
|
||||
default:
|
||||
case MSG_SAVED:
|
||||
default:
|
||||
{
|
||||
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);
|
||||
|
@ -1388,7 +1388,7 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
|
|||
}
|
||||
}
|
||||
break;
|
||||
case VM_CHECK_CONFIG:
|
||||
case VM_CHECK_CONFIG:
|
||||
{
|
||||
char *sql = NULL;
|
||||
char input[10] = "";
|
||||
|
@ -1482,7 +1482,7 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
|
|||
continue;
|
||||
}
|
||||
break;
|
||||
case VM_CHECK_MENU:
|
||||
case VM_CHECK_MENU:
|
||||
{
|
||||
char input[10] = "";
|
||||
char key_buf[80] = "";
|
||||
|
@ -1517,7 +1517,7 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
|
|||
continue;
|
||||
}
|
||||
break;
|
||||
case VM_CHECK_AUTH:
|
||||
case VM_CHECK_AUTH:
|
||||
{
|
||||
if (!attempts) {
|
||||
failed = 1;
|
||||
|
@ -1630,19 +1630,19 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
|
|||
|
||||
continue;
|
||||
|
||||
failed:
|
||||
failed:
|
||||
status = switch_ivr_phrase_macro(session, VM_FAIL_AUTH_MACRO, NULL, NULL, NULL);
|
||||
myid = id;
|
||||
mypass = NULL;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
end:
|
||||
|
||||
if (switch_channel_ready(channel)) {
|
||||
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:
|
||||
greet:
|
||||
memset(buf, 0, sizeof(buf));
|
||||
args.input_callback = cancel_on_dtmf;
|
||||
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)) {
|
||||
switch_event_t *event;
|
||||
|
@ -2683,7 +2683,7 @@ SWITCH_STANDARD_API(voicemail_api_function)
|
|||
|
||||
goto done;
|
||||
|
||||
error:
|
||||
error:
|
||||
if (host) {
|
||||
if (!ct) {
|
||||
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);
|
||||
|
||||
done:
|
||||
done:
|
||||
switch_safe_free(mydata);
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue