~ubuntu-branches/ubuntu/dapper/asterisk/dapper-security

« back to all changes in this revision

Viewing changes to apps/app_externalivr.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2006-05-18 10:21:06 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20060518102106-5vgpbtylsvr9jiu3
Tags: 1:1.2.7.1.dfsg-2ubuntu1
* Resynchronized with Debian, only Ubuntu changes:
  - debian/*.init:
    - create /var/run/ directory if necessary.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 
35
35
#include "asterisk.h"
36
36
 
37
 
ASTERISK_FILE_VERSION(__FILE__, "$Revision: 7251 $")
 
37
ASTERISK_FILE_VERSION(__FILE__, "$Revision: 7634 $")
38
38
 
39
39
#include "asterisk/lock.h"
40
40
#include "asterisk/file.h"
94
94
        char tmp[256];
95
95
 
96
96
        if (!data) {
97
 
                snprintf(tmp, sizeof(tmp), "%c,%10ld", event, time(NULL));
 
97
                snprintf(tmp, sizeof(tmp), "%c,%10d", event, (int)time(NULL));
98
98
        } else {
99
 
                snprintf(tmp, sizeof(tmp), "%c,%10ld,%s", event, time(NULL), data);
 
99
                snprintf(tmp, sizeof(tmp), "%c,%10d,%s", event, (int)time(NULL), data);
100
100
        }
101
101
 
102
102
        fprintf(handle, "%s\n", tmp);
345
345
                        goto exit;
346
346
                }
347
347
 
348
 
                setvbuf(child_events, NULL, _IONBF, 0);
349
 
 
350
348
                if (!(child_commands = fdopen(child_commands_fd, "r"))) {
351
349
                        ast_chan_log(LOG_WARNING, chan, "Could not open stream for child commands\n");
352
350
                        goto exit;
357
355
                        goto exit;
358
356
                }
359
357
 
 
358
                setvbuf(child_events, NULL, _IONBF, 0);
 
359
                setvbuf(child_commands, NULL, _IONBF, 0);
 
360
                setvbuf(child_errors, NULL, _IONBF, 0);
 
361
 
360
362
                res = 0;
361
363
 
362
364
                while (1) {