Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
e09eda9c
Commit
e09eda9c
authored
24 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
download and highlevel are replaced with transfer
parent
c6877a41
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
lib/download.c
+0
-99
0 additions, 99 deletions
lib/download.c
lib/highlevel.h
+0
-26
0 additions, 26 deletions
lib/highlevel.h
lib/transfer.c
+33
-1
33 additions, 1 deletion
lib/transfer.c
lib/transfer.h
+6
-2
6 additions, 2 deletions
lib/transfer.h
with
39 additions
and
128 deletions
lib/download.c
deleted
100644 → 0
+
0
−
99
View file @
c6877a41
/*****************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* In order to be useful for every potential user, curl and libcurl are
* dual-licensed under the MPL and the MIT/X-derivate licenses.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the MPL or the MIT/X-derivate
* licenses. You may pick one of these licenses.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
* $Id$
*****************************************************************************/
#include
"setup.h"
#include
<stdlib.h>
#include
<stdio.h>
#include
<string.h>
#ifdef HAVE_SYS_TYPES_H
#include
<sys/types.h>
#endif
#ifdef HAVE_UNISTD_H
#include
<unistd.h>
#endif
#ifdef HAVE_SYS_SELECT_H
#include
<sys/select.h>
#endif
#include
"urldata.h"
#include
<curl/curl.h>
#ifdef __BEOS__
#include
<net/socket.h>
#endif
#ifdef WIN32
#if !defined( __GNUC__) || defined(__MINGW32__)
#include
<winsock.h>
#endif
#include
<time.h>
/* for the time_t typedef! */
#if defined(__GNUC__) && defined(TIME_WITH_SYS_TIME)
#include
<sys/time.h>
#endif
#endif
#include
"progress.h"
#include
"sendf.h"
#include
<curl/types.h>
/* --- download and upload a stream from/to a socket --- */
/* Parts of this function was brought to us by the friendly Mark Butler
<butlerm@xmission.com>. */
CURLcode
Curl_Transfer
(
CURLconnect
*
c_conn
,
/* READ stuff */
int
sockfd
,
/* socket to read from or -1 */
int
size
,
/* -1 if unknown at this point */
bool
getheader
,
/* TRUE if header parsing is wanted */
long
*
bytecountp
,
/* return number of bytes read or NULL */
/* WRITE stuff */
int
writesockfd
,
/* socket to write to, it may very well be
the same we read from. -1 disables */
long
*
writebytecountp
/* return number of bytes written or NULL */
)
{
struct
connectdata
*
conn
=
(
struct
connectdata
*
)
c_conn
;
if
(
!
conn
)
return
CURLE_BAD_FUNCTION_ARGUMENT
;
/* now copy all input parameters */
conn
->
sockfd
=
sockfd
;
conn
->
size
=
size
;
conn
->
getheader
=
getheader
;
conn
->
bytecountp
=
bytecountp
;
conn
->
writesockfd
=
writesockfd
;
conn
->
writebytecountp
=
writebytecountp
;
return
CURLE_OK
;
}
This diff is collapsed.
Click to expand it.
lib/highlevel.h
deleted
100644 → 0
+
0
−
26
View file @
c6877a41
#ifndef __HIGHLEVEL_H
#define __HIGHLEVEL_H
/*****************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* In order to be useful for every potential user, curl and libcurl are
* dual-licensed under the MPL and the MIT/X-derivate licenses.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the MPL or the MIT/X-derivate
* licenses. You may pick one of these licenses.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
* $Id$
*****************************************************************************/
CURLcode
curl_transfer
(
CURL
*
curl
);
#endif
This diff is collapsed.
Click to expand it.
lib/
highlevel
.c
→
lib/
transfer
.c
+
33
−
1
View file @
e09eda9c
...
...
@@ -84,7 +84,7 @@
#include
"getenv.h"
#include
"hostip.h"
#include
"
download
.h"
#include
"
transfer
.h"
#include
"sendf.h"
#include
"speedcheck.h"
#include
"getpass.h"
...
...
@@ -103,6 +103,9 @@
#define min(a, b) ((a) < (b) ? (a) : (b))
#endif
/* Parts of this function was written by the friendly Mark Butler
<butlerm@xmission.com>. */
CURLcode
static
_Transfer
(
struct
connectdata
*
c_conn
)
{
...
...
@@ -733,3 +736,32 @@ CURLcode curl_transfer(CURL *curl)
return
res
;
}
CURLcode
Curl_Transfer
(
struct
connectdata
*
c_conn
,
/* connection data */
int
sockfd
,
/* socket to read from or -1 */
int
size
,
/* -1 if unknown at this point */
bool
getheader
,
/* TRUE if header parsing is wanted */
long
*
bytecountp
,
/* return number of bytes read or NULL */
int
writesockfd
,
/* socket to write to, it may very well be
the same we read from. -1 disables */
long
*
writebytecountp
/* return number of bytes written or
NULL */
)
{
struct
connectdata
*
conn
=
(
struct
connectdata
*
)
c_conn
;
if
(
!
conn
)
return
CURLE_BAD_FUNCTION_ARGUMENT
;
/* now copy all input parameters */
conn
->
sockfd
=
sockfd
;
conn
->
size
=
size
;
conn
->
getheader
=
getheader
;
conn
->
bytecountp
=
bytecountp
;
conn
->
writesockfd
=
writesockfd
;
conn
->
writebytecountp
=
writebytecountp
;
return
CURLE_OK
;
}
This diff is collapsed.
Click to expand it.
lib/
download
.h
→
lib/
transfer
.h
+
6
−
2
View file @
e09eda9c
#ifndef __
DOWNLOAD
_H
#define __
DOWNLOAD
_H
#ifndef __
TRANSFER
_H
#define __
TRANSFER
_H
/*****************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
...
...
@@ -22,6 +22,8 @@
*
* $Id$
*****************************************************************************/
CURLcode
curl_transfer
(
CURL
*
curl
);
CURLcode
Curl_Transfer
(
struct
connectdata
*
data
,
int
sockfd
,
/* socket to read from or -1 */
...
...
@@ -33,8 +35,10 @@ Curl_Transfer (struct connectdata *data,
long
*
writebytecountp
/* return number of bytes written */
);
#ifdef _OLDCURL
/* "hackish" define to make sources compile without too much human editing.
Don't use "Tranfer()" anymore! */
#define Transfer(a,b,c,d,e,f,g) Curl_Transfer(a,b,c,d,e,f,g)
#endif
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment