]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
MODAPP-447
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 20 Aug 2010 22:48:14 +0000 (17:48 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 20 Aug 2010 22:48:14 +0000 (17:48 -0500)
src/mod/applications/mod_voicemail/mod_voicemail.c

index a1072c816e85f5e54c29bdbad3fad6dc80e7c57d..c6837129227da2fa95977009b5a54d72ef829013 100644 (file)
@@ -3593,10 +3593,13 @@ static int play_callback(void *pArg, int argc, char **argv, char **columnNames)
        return 0;
 }
 
-static void do_play(vm_profile_t *profile, char *user, char *domain, char *file, switch_stream_handle_t *stream)
+static void do_play(vm_profile_t *profile, char *user_in, char *domain, char *file, switch_stream_handle_t *stream)
 {
        char *sql;
        struct holder holder;
+       char *user;
+
+       user = resolve_id(user_in, domain, "web-vm");
 
        sql = switch_mprintf("update voicemail_msgs set read_epoch=%ld where username='%s' and domain='%s' and file_path like '%%%s'",
                                                 (long) switch_epoch_time_now(NULL), user, domain, file);
@@ -3616,12 +3619,15 @@ static void do_play(vm_profile_t *profile, char *user, char *domain, char *file,
 }
 
 
-static void do_del(vm_profile_t *profile, char *user, char *domain, char *file, switch_stream_handle_t *stream)
+static void do_del(vm_profile_t *profile, char *user_in, char *domain, char *file, switch_stream_handle_t *stream)
 {
        char *myfolder = "inbox";
        char *sql;
        struct holder holder;
        char *ref = NULL;
+       char *user;
+
+       user = resolve_id(user_in, domain, "web-vm");
 
        if (stream->param_event) {
                ref = switch_event_get_header(stream->param_event, "http-referer");