a quick fix to app_sms.c to get rid of cursed compiler warnings so I can compile...
[asterisk/asterisk.git] / channels / chan_zap.c
index 127b0ed..5f267e2 100644 (file)
@@ -10242,7 +10242,7 @@ static int start_pri(struct zt_pri *pri)
        for (i = 0; i < NUM_DCHANS; i++) {
                if (!pri->dchannels[i])
                        break;
        for (i = 0; i < NUM_DCHANS; i++) {
                if (!pri->dchannels[i])
                        break;
-               pri->fds[i] = open("/dev/zap/channel", O_RDWR, 0600);
+               pri->fds[i] = open("/dev/zap/channel", O_RDWR);
                x = pri->dchannels[i];
                if ((pri->fds[i] < 0) || (ioctl(pri->fds[i],ZT_SPECIFY,&x) == -1)) {
                        ast_log(LOG_ERROR, "Unable to open D-channel %d (%s)\n", x, strerror(errno));
                x = pri->dchannels[i];
                if ((pri->fds[i] < 0) || (ioctl(pri->fds[i],ZT_SPECIFY,&x) == -1)) {
                        ast_log(LOG_ERROR, "Unable to open D-channel %d (%s)\n", x, strerror(errno));
@@ -10359,7 +10359,7 @@ static int handle_pri_set_debug_file(int fd, int argc, char **argv)
                if (ast_strlen_zero(argv[4]))
                        return RESULT_SHOWUSAGE;
 
                if (ast_strlen_zero(argv[4]))
                        return RESULT_SHOWUSAGE;
 
-               myfd = open(argv[4], O_CREAT|O_WRONLY);
+               myfd = open(argv[4], O_CREAT|O_WRONLY, AST_FILE_MODE);
                if (myfd < 0) {
                        ast_cli(fd, "Unable to open '%s' for writing\n", argv[4]);
                        return RESULT_SUCCESS;
                if (myfd < 0) {
                        ast_cli(fd, "Unable to open '%s' for writing\n", argv[4]);
                        return RESULT_SUCCESS;