]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fixes
authorAnthony Minessale <anthony.minessale@gmail.com>
Fri, 14 Dec 2007 17:39:45 +0000 (17:39 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Fri, 14 Dec 2007 17:39:45 +0000 (17:39 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6792 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_voicemail/mod_voicemail.c
src/mod/endpoints/mod_sofia/sofia_presence.c

index e66f0ae2fc739cb1a6f3caca92c6f0af92c17ed0..3ba0b968a7f8098086530f93b5db5ff59300b5c1 100644 (file)
@@ -693,7 +693,7 @@ static switch_status_t control_playback(switch_core_session_t *session, void *in
                 return SWITCH_STATUS_BREAK;
             }
 
-            if (!fh) {
+            if (!(fh && fh->file_interface && switch_test_flag(fh, SWITCH_FILE_OPEN))) {
                 return SWITCH_STATUS_SUCCESS;
             }
 
index 3ac6eb1bc40081bf71ac848efe65875fc38cba4d..1454dad09c7ca07f15944d9656027b2fa957b966 100644 (file)
@@ -240,7 +240,7 @@ void sofia_presence_mwi_event_handler(switch_event_t *event)
 
        
        if (!count) {
-               sql = switch_mprintf("select *,'%q' from sip_registrations where sip_user='%q' and sip_host='%q'", 
+               sql = switch_mprintf("select sip_user,sip_host,contact,'%q' from sip_registrations where sip_user='%q' and sip_host='%q'", 
                                                         stream.data, user, host);
        
 
@@ -682,14 +682,15 @@ static int sofia_presence_mwi_callback(void *pArg, int argc, char **argv, char *
 
 static int sofia_presence_mwi_callback2(void *pArg, int argc, char **argv, char **columnNames)
 {
-       char *sub_to_user = argv[1];
-       char *sub_to_host = argv[2];
+       char *sub_to_user = argv[0];
+       char *sub_to_host = argv[1];
        char *event = "message-summary";
-       char *body = argv[7];
+       char *contact = argv[2];
+       char *body = argv[3];
        sofia_profile_t *profile = NULL;
        char *id = NULL;
        nua_handle_t *nh;
-       char *contact;
+
        
        if (!(profile = sofia_glue_find_profile(sub_to_host))) {
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot find profile for host %s\n", sub_to_host);
@@ -698,7 +699,7 @@ static int sofia_presence_mwi_callback2(void *pArg, int argc, char **argv, char
 
        id = switch_mprintf("sip:%s@%s", sub_to_user, sub_to_host);
 
-       contact = sofia_glue_get_url_from_contact(argv[3], 0);
+       contact = sofia_glue_get_url_from_contact(contact, 0);
        
        nh = nua_handle(profile->nua, NULL,
                                        NUTAG_URL(contact),