src/lib/https.c 1.5
1.5 2010/03/10 23:41:17 angie
Instead of errAborting in low-level net.c routines, pass errors up to higher-level code, most of which already checks for error return values.
Index: src/lib/https.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/lib/https.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -b -B -U 4 -r1.4 -r1.5
--- src/lib/https.c 14 Jan 2010 01:07:19 -0000 1.4
+++ src/lib/https.c 10 Mar 2010 23:41:17 -0000 1.5
@@ -1,4 +1,5 @@
+/* Connect via https. */
#ifdef USE_SSL
#include "openssl/ssl.h"
@@ -9,10 +10,10 @@
#include "common.h"
#include "errabort.h"
-int netMustConnectHttps(char *hostName, int port)
-/* Start https connection with server or die. */
+int netConnectHttps(char *hostName, int port)
+/* Return socket for https connection with server or -1 if error. */
{
fflush(stdin);
fflush(stdout);
@@ -24,9 +25,9 @@
int pid = fork();
if (pid < 0)
- errnoAbort("can't fork in netMustConnectHttps");
+ errnoAbort("can't fork in netConnectHttps");
if (pid == 0)
{
/* child */
@@ -177,15 +178,12 @@
#include <stdarg.h>
#include "common.h"
#include "errabort.h"
-int netMustConnectHttps(char *hostName, int port)
+int netConnectHttps(char *hostName, int port)
/* Start https connection with server or die. */
{
-
-errnoAbort("No openssl available in netMustConnectHttps for %s : %d", hostName, port);
-
+errAbort("No openssl available in netConnectHttps for %s : %d", hostName, port);
return -1; /* will never get to here, make compiler happy */
-
}
#endif