summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-03-29 08:20:35 +0000
committerMark Spencer <markster@digium.com>2004-03-29 08:20:35 +0000
commit3e9c3379464043cdb325c40575a8c4225b204e5f (patch)
tree140697f994b40b5a665e1a9083075a1fe199573d
parent2c0d0d836c179acf8e069ad113a62cf49c460be3 (diff)
Small SIP fix, voicemail fix, and some delivery fixes on new apps
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rwxr-xr-xapps/app_mp3.c2
-rwxr-xr-xapps/app_nbscat.c2
-rwxr-xr-xapps/app_voicemail.c2
-rwxr-xr-xchannels/chan_sip.c2
4 files changed, 7 insertions, 1 deletions
diff --git a/apps/app_mp3.c b/apps/app_mp3.c
index 7f7d31849..2ada2ab9d 100755
--- a/apps/app_mp3.c
+++ b/apps/app_mp3.c
@@ -170,6 +170,8 @@ static int mp3_exec(struct ast_channel *chan, void *data)
myf.f.mallocd = 0;
myf.f.offset = AST_FRIENDLY_OFFSET;
myf.f.src = __PRETTY_FUNCTION__;
+ myf.f.delivery.tv_sec = 0;
+ myf.f.delivery.tv_usec = 0;
myf.f.data = myf.frdata;
if (ast_write(chan, &myf.f) < 0) {
res = -1;
diff --git a/apps/app_nbscat.c b/apps/app_nbscat.c
index 6c2808551..3499f5500 100755
--- a/apps/app_nbscat.c
+++ b/apps/app_nbscat.c
@@ -150,6 +150,8 @@ static int NBScat_exec(struct ast_channel *chan, void *data)
myf.f.subclass = AST_FORMAT_SLINEAR;
myf.f.datalen = res;
myf.f.samples = res / 2;
+ myf.f.delivery.tv_usec = 0;
+ myf.f.delivery.tv_sec = 0;
myf.f.mallocd = 0;
myf.f.offset = AST_FRIENDLY_OFFSET;
myf.f.src = __PRETTY_FUNCTION__;
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 5e562e333..98a79e13a 100755
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -849,7 +849,7 @@ static int sendpage(char *srcemail, char *pager, int msgnum, char *mailbox, char
time_t t;
struct tm tm;
struct vm_zone *the_zone = NULL;
- p = popen(mailcmd, "w");
+ pfd = mkstemp(tmp);
if (pfd > -1) {
p = fdopen(pfd, "w");
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index cd2880226..4bf464274 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -3282,6 +3282,8 @@ static int transmit_register(struct sip_registry *r, char *cmd, char *auth, char
snprintf(addr, sizeof(addr), "sip:%s", r->hostname);
strncpy(p->uri, addr, sizeof(p->uri) - 1);
+ p->branch ^= rand();
+
memset(&req, 0, sizeof(req));
init_req(&req, cmd, addr);