summaryrefslogtreecommitdiffstats
path: root/nanohttp/nanohttp-client.c
diff options
context:
space:
mode:
authorGravatar snowdrop2005-12-19 14:18:26 +0000
committerGravatar snowdrop2005-12-19 14:18:26 +0000
commit8684b8cf790b76fc68e2cc2b7f797c505c70ee2f (patch)
tree57a5b9a7280a4dd18ebd0a5f5c64cfafaa024418 /nanohttp/nanohttp-client.c
parent99a176eedc568df17240abdb0abad9b0931b791e (diff)
downloadcsoap-8684b8cf790b76fc68e2cc2b7f797c505c70ee2f.tar.gz
csoap-8684b8cf790b76fc68e2cc2b7f797c505c70ee2f.tar.bz2
pathed stuf from mailinglist after 1.0.4rc1
Diffstat (limited to 'nanohttp/nanohttp-client.c')
-rw-r--r--nanohttp/nanohttp-client.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/nanohttp/nanohttp-client.c b/nanohttp/nanohttp-client.c
index 79d6b0a..cd13af8 100644
--- a/nanohttp/nanohttp-client.c
+++ b/nanohttp/nanohttp-client.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: nanohttp-client.c,v 1.29 2005/12/19 14:06:16 snowdrop Exp $
+* $Id: nanohttp-client.c,v 1.30 2005/12/19 14:18:26 snowdrop Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -126,6 +126,20 @@ httpc_free(httpc_conn_t * conn)
}
+/*--------------------------------------------------
+ FUNCTION: httpc_close_free
+ DESC: Close and free the given http client object.
+ ----------------------------------------------------*/
+void
+httpc_close_free(httpc_conn_t * conn)
+{
+ if (conn == NULL)
+ return;
+
+ hsocket_close(conn->sock);
+ httpc_free(conn);
+}
+
/*--------------------------------------------------
FUNCTION: httpc_set_header