Code before declaration and formatting

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14986 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Jeff Lenk 2009-09-25 19:53:30 +00:00
parent 08b43d8bb1
commit 9f76dbbe6e
1 changed files with 55 additions and 55 deletions

View File

@ -3296,6 +3296,8 @@ SWITCH_STANDARD_API(prefs_api_function)
const char *how = "greeting_path";
vm_profile_t *profile = NULL;
char *id, *domain, *p, *profilename = NULL;
char sql[256];
prefs_callback_t cbt = {{0}};
if (switch_strlen_zero(cmd)) {
stream->write_function(stream, "%d", 0);
@ -3339,8 +3341,6 @@ SWITCH_STANDARD_API(prefs_api_function)
goto done;
}
char sql[256];
prefs_callback_t cbt = {{0}};
switch_snprintf(sql, sizeof(sql), "select * from voicemail_prefs where username='%s' and domain='%s'", id, domain);
vm_execute_sql_callback(profile, profile->mutex, sql, prefs_callback, &cbt);