Small SIP fix, voicemail fix, and some delivery fixes on new apps
authorMark Spencer <markster@digium.com>
Mon, 29 Mar 2004 08:20:35 +0000 (08:20 +0000)
committerMark Spencer <markster@digium.com>
Mon, 29 Mar 2004 08:20:35 +0000 (08:20 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2581 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_mp3.c
apps/app_nbscat.c
apps/app_voicemail.c
channels/chan_sip.c

index 7f7d318..2ada2ab 100755 (executable)
@@ -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;
index 6c28085..3499f55 100755 (executable)
@@ -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__;
index 5e562e3..98a79e1 100755 (executable)
@@ -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");
index cd28802..4bf4642 100755 (executable)
@@ -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);