format code

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@727 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2006-03-02 14:52:51 +00:00
parent e9ba607a6c
commit 55b7373a07

View File

@ -146,15 +146,11 @@ static switch_status init_js(void)
globals.gErrFile = stderr;
globals.gOutFile = stdout;
if (!(globals.rt = JS_NewRuntime(64L * 1024L * 1024L))) {
return SWITCH_STATUS_FALSE;
}
return SWITCH_STATUS_SUCCESS;
}
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];
if (l != 0) while (l < 6)
}
if (l != 0) while (l < 6) {
out[bytes++] = '=', l += 2;
}
if (write(fd, &out, bytes) != bytes) {
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);
if (ifd)
}
if (ifd) {
close(ifd);
}
snprintf(buf, B64BUFFLEN, "/bin/cat %s | /usr/sbin/sendmail -tf \"%s\" %s", filename, from, to);
system(buf);
unlink(filename);