gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 153/208: nss: unify the coding style of nss_send()


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 153/208: nss: unify the coding style of nss_send() and nss_recv()
Date: Wed, 09 Aug 2017 17:35:50 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to annotated tag gnurl-7.55.0
in repository gnurl.

commit c89eb6d0f87a3620074bc04a6af255e5dc3a523e
Author: Kamil Dudka <address@hidden>
AuthorDate: Thu Jul 20 08:05:59 2017 +0200

    nss: unify the coding style of nss_send() and nss_recv()
    
    No changes in behavior intended by this commit.
---
 lib/vtls/nss.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/lib/vtls/nss.c b/lib/vtls/nss.c
index 0097caf01..ac3730fdb 100644
--- a/lib/vtls/nss.c
+++ b/lib/vtls/nss.c
@@ -2181,8 +2181,10 @@ static ssize_t nss_send(struct connectdata *conn,  /* 
connection data */
                         size_t len,                /* amount to write */
                         CURLcode *curlcode)
 {
-  ssize_t rc = PR_Send(conn->ssl[sockindex].handle, mem, (int)len, 0,
-                       PR_INTERVAL_NO_WAIT);
+  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+  ssize_t rc;
+
+  rc = PR_Send(connssl->handle, mem, (int)len, 0, PR_INTERVAL_NO_WAIT);
   if(rc < 0) {
     PRInt32 err = PR_GetError();
     if(err == PR_WOULD_BLOCK_ERROR)
@@ -2206,14 +2208,17 @@ static ssize_t nss_send(struct connectdata *conn,  /* 
connection data */
   return rc; /* number of bytes */
 }
 
-static ssize_t nss_recv(struct connectdata * conn, /* connection data */
-                        int num,                   /* socketindex */
+static ssize_t nss_recv(struct connectdata *conn,  /* connection data */
+                        int sockindex,             /* socketindex */
                         char *buf,                 /* store read data here */
                         size_t buffersize,         /* max amount to read */
                         CURLcode *curlcode)
 {
-  ssize_t nread = PR_Recv(conn->ssl[num].handle, buf, (int)buffersize, 0,
-                          PR_INTERVAL_NO_WAIT);
+  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+  ssize_t nread;
+
+  nread = PR_Recv(connssl->handle, buf, (int)buffersize, 0,
+                  PR_INTERVAL_NO_WAIT);
   if(nread < 0) {
     /* failed SSL read */
     PRInt32 err = PR_GetError();

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]