Commit 0a578b18 authored by Pekka Pessi's avatar Pekka Pessi

tport/tport_type_tls.c: fixed whitespace

darcs-hash:20081127130818-db55f-f1bbd210f7f4665895b7d3837d52fef49c1dd1b3.gz
parent 1785cd1c
...@@ -54,11 +54,11 @@ ...@@ -54,11 +54,11 @@
#include "tport_tls.h" #include "tport_tls.h"
static int tport_tls_init_primary(tport_primary_t *, static int tport_tls_init_primary(tport_primary_t *,
tp_name_t tpn[1], tp_name_t tpn[1],
su_addrinfo_t *, tagi_t const *, su_addrinfo_t *, tagi_t const *,
char const **return_culprit); char const **return_culprit);
static int tport_tls_init_client(tport_primary_t *, static int tport_tls_init_client(tport_primary_t *,
tp_name_t tpn[1], tp_name_t tpn[1],
su_addrinfo_t *, tagi_t const *, su_addrinfo_t *, tagi_t const *,
char const **return_culprit); char const **return_culprit);
static int tport_tls_init_master(tport_primary_t *pri, static int tport_tls_init_master(tport_primary_t *pri,
...@@ -182,7 +182,7 @@ static int tport_tls_init_master(tport_primary_t *pri, ...@@ -182,7 +182,7 @@ static int tport_tls_init_master(tport_primary_t *pri,
homedir = ""; homedir = "";
path = tbf = su_sprintf(autohome, "%s/.sip/auth", homedir); path = tbf = su_sprintf(autohome, "%s/.sip/auth", homedir);
} }
if (path) { if (path) {
ti.verify_peer = tls_verify; ti.verify_peer = tls_verify;
ti.verify_depth = 2; ti.verify_depth = 2;
...@@ -252,7 +252,7 @@ static void tport_tls_deinit_secondary(tport_t *self) ...@@ -252,7 +252,7 @@ static void tport_tls_deinit_secondary(tport_t *self)
tport_tls_t *tlstp = (tport_tls_t *)self; tport_tls_t *tlstp = (tport_tls_t *)self;
/* XXX - PPe: does the tls_shutdown zap everything but socket? */ /* XXX - PPe: does the tls_shutdown zap everything but socket? */
if (tlstp->tlstp_context != NULL) if (tlstp->tlstp_context != NULL)
tls_free(tlstp->tlstp_context); tls_free(tlstp->tlstp_context);
tlstp->tlstp_context = NULL; tlstp->tlstp_context = NULL;
...@@ -281,16 +281,16 @@ int tport_tls_set_events(tport_t const *self) ...@@ -281,16 +281,16 @@ int tport_tls_set_events(tport_t const *self)
int mask = tls_events(tlstp->tlstp_context, self->tp_events); int mask = tls_events(tlstp->tlstp_context, self->tp_events);
SU_DEBUG_7(("%s(%p): logical events%s%s real%s%s\n", SU_DEBUG_7(("%s(%p): logical events%s%s real%s%s\n",
"tport_tls_set_events", (void *)self, "tport_tls_set_events", (void *)self,
(self->tp_events & SU_WAIT_IN) ? " IN" : "", (self->tp_events & SU_WAIT_IN) ? " IN" : "",
(self->tp_events & SU_WAIT_OUT) ? " OUT" : "", (self->tp_events & SU_WAIT_OUT) ? " OUT" : "",
(mask & SU_WAIT_IN) ? " IN" : "", (mask & SU_WAIT_IN) ? " IN" : "",
(mask & SU_WAIT_OUT) ? " OUT" : "")); (mask & SU_WAIT_OUT) ? " OUT" : ""));
return return
su_root_eventmask(self->tp_master->mr_root, su_root_eventmask(self->tp_master->mr_root,
self->tp_index, self->tp_index,
self->tp_socket, self->tp_socket,
mask); mask);
} }
...@@ -311,7 +311,7 @@ int tport_tls_events(tport_t *self, int events) ...@@ -311,7 +311,7 @@ int tport_tls_events(tport_t *self, int events)
else if (ret < 0) else if (ret < 0)
tport_error_report(self, errno, NULL); tport_error_report(self, errno, NULL);
} }
if ((self->tp_events & SU_WAIT_IN) && !self->tp_closed) { if ((self->tp_events & SU_WAIT_IN) && !self->tp_closed) {
for (;;) { for (;;) {
ret = tls_want_read(tlstp->tlstp_context, events); ret = tls_want_read(tlstp->tlstp_context, events);
...@@ -348,15 +348,15 @@ int tport_tls_events(tport_t *self, int events) ...@@ -348,15 +348,15 @@ int tport_tls_events(tport_t *self, int events)
return 0; return 0;
SU_DEBUG_7(("%s(%p): logical events%s%s real%s%s\n", SU_DEBUG_7(("%s(%p): logical events%s%s real%s%s\n",
"tport_tls_events", (void *)self, "tport_tls_events", (void *)self,
(events & SU_WAIT_IN) ? " IN" : "", (events & SU_WAIT_IN) ? " IN" : "",
(events & SU_WAIT_OUT) ? " OUT" : "", (events & SU_WAIT_OUT) ? " OUT" : "",
(mask & SU_WAIT_IN) ? " IN" : "", (mask & SU_WAIT_IN) ? " IN" : "",
(mask & SU_WAIT_OUT) ? " OUT" : "")); (mask & SU_WAIT_OUT) ? " OUT" : ""));
su_root_eventmask(self->tp_master->mr_root, su_root_eventmask(self->tp_master->mr_root,
self->tp_index, self->tp_index,
self->tp_socket, self->tp_socket,
mask); mask);
return 0; return 0;
...@@ -365,12 +365,12 @@ int tport_tls_events(tport_t *self, int events) ...@@ -365,12 +365,12 @@ int tport_tls_events(tport_t *self, int events)
/** Receive data from TLS. /** Receive data from TLS.
* *
* @retval -1 error * @retval -1 error
* @retval 0 end-of-stream * @retval 0 end-of-stream
* @retval 1 normal receive * @retval 1 normal receive
* @retval 2 incomplete recv, recv again * @retval 2 incomplete recv, recv again
* *
*/ */
static static
int tport_tls_recv(tport_t *self) int tport_tls_recv(tport_t *self)
{ {
tport_tls_t *tlstp = (tport_tls_t *)self; tport_tls_t *tlstp = (tport_tls_t *)self;
...@@ -411,7 +411,7 @@ int tport_tls_recv(tport_t *self) ...@@ -411,7 +411,7 @@ int tport_tls_recv(tport_t *self)
memcpy(iovec[i].mv_base, tls_buf + n, m); memcpy(iovec[i].mv_base, tls_buf + n, m);
n += m; n += m;
} }
assert(N == n); assert(N == n);
/* Write the received data to the message dump file */ /* Write the received data to the message dump file */
...@@ -453,7 +453,7 @@ ssize_t tport_tls_send(tport_t const *self, ...@@ -453,7 +453,7 @@ ssize_t tport_tls_send(tport_t const *self,
for (i = 0; i < iovlen; i = j) { for (i = 0; i < iovlen; i = j) {
#if 0 #if 0
nerror = tls_write(tlstp->tlstp_context, nerror = tls_write(tlstp->tlstp_context,
iov[i].siv_base, iov[i].siv_base,
m = iov[i].siv_len); m = iov[i].siv_len);
j = i + 1; j = i + 1;
...@@ -464,7 +464,7 @@ ssize_t tport_tls_send(tport_t const *self, ...@@ -464,7 +464,7 @@ ssize_t tport_tls_send(tport_t const *self,
if (i + 1 == iovlen) if (i + 1 == iovlen)
buf = NULL; /* Don't bother copying single chunk */ buf = NULL; /* Don't bother copying single chunk */
if (buf && if (buf &&
(char *)iov[i].siv_base - buf < TLSBUFSIZE && (char *)iov[i].siv_base - buf < TLSBUFSIZE &&
(char *)iov[i].siv_base - buf >= 0) { (char *)iov[i].siv_base - buf >= 0) {
tlsbufsize = buf + TLSBUFSIZE - (char *)iov[i].siv_base; tlsbufsize = buf + TLSBUFSIZE - (char *)iov[i].siv_base;
...@@ -487,8 +487,8 @@ ssize_t tport_tls_send(tport_t const *self, ...@@ -487,8 +487,8 @@ ssize_t tport_tls_send(tport_t const *self,
nerror = tls_write(tlstp->tlstp_context, buf, m); nerror = tls_write(tlstp->tlstp_context, buf, m);
#endif #endif
SU_DEBUG_9(("tport_tls_writevec: vec %p %p %lu ("MOD_ZD")\n", SU_DEBUG_9(("tport_tls_writevec: vec %p %p %lu ("MOD_ZD")\n",
(void *)tlstp->tlstp_context, (void *)iov[i].siv_base, (LU)iov[i].siv_len, (void *)tlstp->tlstp_context, (void *)iov[i].siv_base, (LU)iov[i].siv_len,
nerror)); nerror));
if (nerror == -1) { if (nerror == -1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment