Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zmap
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
zmap
Commits
47044aa1
Commit
47044aa1
authored
16 years ago
by
rds
Browse files
Options
Downloads
Patches
Plain Diff
fix pointer messup
fix up better error handling if curl connect fails
parent
8e7a156f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/libpfetch/libpfetch.c
+25
-5
25 additions, 5 deletions
src/libpfetch/libpfetch.c
with
25 additions
and
5 deletions
src/libpfetch/libpfetch.c
+
25
−
5
View file @
47044aa1
...
...
@@ -27,9 +27,9 @@
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited:
Jun 12
13:
5
9 2008 (rds)
* Last edited:
Oct 23
13:
2
9 2008 (rds)
* Created: Fri Apr 4 14:21:42 2008 (rds)
* CVS info: $Id: libpfetch.c,v 1.
4
2008-
06-17 07:38:16
rds Exp $
* CVS info: $Id: libpfetch.c,v 1.
5
2008-
10-23 12:31:41
rds Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -147,7 +147,7 @@ PFetchStatus PFetchHandleFetchMultiple(PFetchHandle pfetch, char **sequences, in
seq_string
=
g_string_sized_new
(
128
);
for
(
i
=
0
;
i
<
count
;
i
++
,
*
seq_ptr
++
)
for
(
i
=
0
;
i
<
count
;
i
++
,
seq_ptr
++
)
{
g_string_append_printf
(
seq_string
,
"%s "
,
*
seq_ptr
);
}
...
...
@@ -1051,7 +1051,27 @@ static PFetchStatus pfetch_http_fetch(PFetchHandle handle, char *sequence)
NULL
);
pfetch
->
request_counter
++
;
CURLObjectPerform
(
pfetch
->
curl_object
,
TRUE
);
if
(
CURLObjectPerform
(
pfetch
->
curl_object
,
TRUE
)
==
CURL_STATUS_FAILED
)
{
PFetchHandleClass
handle_class
=
PFETCH_HANDLE_GET_CLASS
(
pfetch
);
GError
*
error
=
NULL
;
char
*
curl_object_error
=
NULL
;
unsigned
int
error_size
=
0
;
/* first get message */
CURLObjectErrorMessage
(
pfetch
->
curl_object
,
&
curl_object_error
);
error_size
=
strlen
(
curl_object_error
);
/* signal error handler... */
emit_signal
(
PFETCH_HANDLE
(
pfetch
),
handle_class
->
handle_signals
[
HANDLE_ERROR_SIGNAL
],
0
,
curl_object_error
,
&
error_size
,
error
);
if
(
curl_object_error
)
/* needs freeing */
g_free
(
curl_object_error
);
/* set our return status */
status
=
PFETCH_STATUS_FAILED
;
}
/* #define TESTING_MULTIPLE_FETCHING */
#ifdef TESTING_MULTIPLE_FETCHING
...
...
@@ -1140,7 +1160,7 @@ static char *build_post_data(PFetchHandleHttp pfetch, char *sequence)
while
(
argv_ptr
&&
*
argv_ptr
)
{
g_string_append_printf
(
post_string
,
"%s "
,
*
argv_ptr
);
*
argv_ptr
++
;
argv_ptr
++
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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