Module: sems
Branch: master
Commit: 15a851cf5e14f75027e518b4e0c4e9d59e395b02
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=15a851cf5e14f75027e518b4e0c4e9d59e395b02

Author: Stefan Sayer <[email protected]>
Committer: Stefan Sayer <[email protected]>
Date:   Tue May 24 13:41:08 2011 +0200

b/f: don't try to unlink tmpfile

---

 apps/voicemail/AnswerMachine.cpp |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/apps/voicemail/AnswerMachine.cpp b/apps/voicemail/AnswerMachine.cpp
index 0fa9fea..b03cc13 100644
--- a/apps/voicemail/AnswerMachine.cpp
+++ b/apps/voicemail/AnswerMachine.cpp
@@ -916,11 +916,6 @@ void AnswerMachineDialog::saveMessage()
   email_dict["vmsg_length"] = rec_len_s;
 
   if(!rec_size){
-    if (unlink(msg_filename.c_str()) < 0) {
-      WARN("unlink(%s) failed: %s\n", 
-          msg_filename.c_str(), strerror(errno));
-    }
-
     // record in box empty messages as well
     if (AnswerMachineFactory::SaveEmptyMsg &&
        ((vm_mode == MODE_BOX) || 
@@ -941,7 +936,8 @@ void AnswerMachineDialog::saveMessage()
        FILE* m_fp = a_msg.getfp();
 
        if (vm_mode == MODE_BOTH) {
-         // copy file to new tmpfile
+         // copy file to new tmpfile - msg_storage closes the fp,
+         // but we may want to send an email, too
          m_fp = tmpfile();
          if(!m_fp){
            ERROR("could not create temporary file: %s\n",

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to