Thread (1 message) 1 message, 1 author, 2016-06-16

Re: [PATCH 1/4] http.h: Add debug callback and helper routine for implementing the GIT_TRACE_CURL environment variable in http.c

From: Junio C Hamano <hidden>
Date: 2016-06-16 02:18:51

Elia Pinto [off-list ref] writes:
quoted hunk
Add the debug callback and helper routine prototype used by
curl_easy_setopt CURLOPT_DEBUGFUNCTION in http.c
for implementing the GIT_TRACE_CURL environment variable


Helped-by: Torsten Bögershausen [off-list ref]
Helped-by: Ramsay Jones [off-list ref]
Helped-by: Junio C Hamano [off-list ref]
Helped-by: Eric Sunshine [off-list ref] 
Helped-by: Jeff King [off-list ref]
Signed-off-by: Elia Pinto <redacted>
---
 http.h | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/http.h b/http.h
index 4ef4bbd..a2d10bc 100644
--- a/http.h
+++ b/http.h
@@ -224,4 +224,10 @@ extern int finish_http_object_request(struct http_object_request *freq);
 extern void abort_http_object_request(struct http_object_request *freq);
 extern void release_http_object_request(struct http_object_request *freq);
 
+/* Debug callback and helper routine for curl_easy_setopt CURLOPT_DEBUGFUNCTION */
+static struct trace_key trace_curl = TRACE_KEY_INIT(CURL);
This will be multiply instanciated in every *.c file that includes http.h?
+int curl_trace(CURL *handle, curl_infotype type, char *data, size_t size, void *userp);
+void curl_dump(const char *text, unsigned char *ptr, size_t size, char nohex);
+
+
 #endif /* HTTP_H */
In any case, you'd want to combine this with 2/4 and write a single
log message for the combined change.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help