mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 12:40:17 +00:00
format code
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@727 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
e9ba607a6c
commit
55b7373a07
@ -146,15 +146,11 @@ static switch_status init_js(void)
|
|||||||
globals.gErrFile = stderr;
|
globals.gErrFile = stderr;
|
||||||
globals.gOutFile = stdout;
|
globals.gOutFile = stdout;
|
||||||
|
|
||||||
|
|
||||||
if (!(globals.rt = JS_NewRuntime(64L * 1024L * 1024L))) {
|
if (!(globals.rt = JS_NewRuntime(64L * 1024L * 1024L))) {
|
||||||
return SWITCH_STATUS_FALSE;
|
return SWITCH_STATUS_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static switch_status js_stream_dtmf_callback(switch_core_session *session, char *dtmf, void *buf, unsigned int buflen)
|
static switch_status js_stream_dtmf_callback(switch_core_session *session, char *dtmf, void *buf, unsigned int buflen)
|
||||||
@ -1398,11 +1394,12 @@ static JSBool js_email(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, js
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (l > 0)
|
if (l > 0) {
|
||||||
out[bytes++] = c64[((b%16)<<(6-l))%64];
|
out[bytes++] = c64[((b%16)<<(6-l))%64];
|
||||||
if (l != 0) while (l < 6)
|
}
|
||||||
|
if (l != 0) while (l < 6) {
|
||||||
out[bytes++] = '=', l += 2;
|
out[bytes++] = '=', l += 2;
|
||||||
|
}
|
||||||
if (write(fd, &out, bytes) != bytes) {
|
if (write(fd, &out, bytes) != bytes) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -1418,11 +1415,12 @@ static JSBool js_email(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, js
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fd)
|
if (fd) {
|
||||||
close(fd);
|
close(fd);
|
||||||
if (ifd)
|
}
|
||||||
|
if (ifd) {
|
||||||
close(ifd);
|
close(ifd);
|
||||||
|
}
|
||||||
snprintf(buf, B64BUFFLEN, "/bin/cat %s | /usr/sbin/sendmail -tf \"%s\" %s", filename, from, to);
|
snprintf(buf, B64BUFFLEN, "/bin/cat %s | /usr/sbin/sendmail -tf \"%s\" %s", filename, from, to);
|
||||||
system(buf);
|
system(buf);
|
||||||
unlink(filename);
|
unlink(filename);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user