@@ -114,6 +114,37 @@ size_t fwrite_null(char *ptr, size_t eltsize, size_t nmemb, void *strbuf)
114
114
return eltsize * nmemb ;
115
115
}
116
116
117
+ static void closedown_active_slot (struct active_request_slot * slot )
118
+ {
119
+ active_requests -- ;
120
+ slot -> in_use = 0 ;
121
+ }
122
+
123
+ static void finish_active_slot (struct active_request_slot * slot )
124
+ {
125
+ closedown_active_slot (slot );
126
+ curl_easy_getinfo (slot -> curl , CURLINFO_HTTP_CODE , & slot -> http_code );
127
+
128
+ if (slot -> finished != NULL )
129
+ (* slot -> finished ) = 1 ;
130
+
131
+ /* Store slot results so they can be read after the slot is reused */
132
+ if (slot -> results != NULL ) {
133
+ slot -> results -> curl_result = slot -> curl_result ;
134
+ slot -> results -> http_code = slot -> http_code ;
135
+ #if LIBCURL_VERSION_NUM >= 0x070a08
136
+ curl_easy_getinfo (slot -> curl , CURLINFO_HTTPAUTH_AVAIL ,
137
+ & slot -> results -> auth_avail );
138
+ #else
139
+ slot -> results -> auth_avail = 0 ;
140
+ #endif
141
+ }
142
+
143
+ /* Run callback if appropriate */
144
+ if (slot -> callback_func != NULL )
145
+ slot -> callback_func (slot -> callback_data );
146
+ }
147
+
117
148
#ifdef USE_CURL_MULTI
118
149
static void process_curl_messages (void )
119
150
{
@@ -730,12 +761,6 @@ void run_active_slot(struct active_request_slot *slot)
730
761
#endif
731
762
}
732
763
733
- static void closedown_active_slot (struct active_request_slot * slot )
734
- {
735
- active_requests -- ;
736
- slot -> in_use = 0 ;
737
- }
738
-
739
764
static void release_active_slot (struct active_request_slot * slot )
740
765
{
741
766
closedown_active_slot (slot );
@@ -752,31 +777,6 @@ static void release_active_slot(struct active_request_slot *slot)
752
777
#endif
753
778
}
754
779
755
- void finish_active_slot (struct active_request_slot * slot )
756
- {
757
- closedown_active_slot (slot );
758
- curl_easy_getinfo (slot -> curl , CURLINFO_HTTP_CODE , & slot -> http_code );
759
-
760
- if (slot -> finished != NULL )
761
- (* slot -> finished ) = 1 ;
762
-
763
- /* Store slot results so they can be read after the slot is reused */
764
- if (slot -> results != NULL ) {
765
- slot -> results -> curl_result = slot -> curl_result ;
766
- slot -> results -> http_code = slot -> http_code ;
767
- #if LIBCURL_VERSION_NUM >= 0x070a08
768
- curl_easy_getinfo (slot -> curl , CURLINFO_HTTPAUTH_AVAIL ,
769
- & slot -> results -> auth_avail );
770
- #else
771
- slot -> results -> auth_avail = 0 ;
772
- #endif
773
- }
774
-
775
- /* Run callback if appropriate */
776
- if (slot -> callback_func != NULL )
777
- slot -> callback_func (slot -> callback_data );
778
- }
779
-
780
780
void finish_all_active_slots (void )
781
781
{
782
782
struct active_request_slot * slot = active_queue_head ;
@@ -839,7 +839,7 @@ char *get_remote_object_url(const char *url, const char *hex,
839
839
return strbuf_detach (& buf , NULL );
840
840
}
841
841
842
- int handle_curl_result (struct slot_results * results )
842
+ static int handle_curl_result (struct slot_results * results )
843
843
{
844
844
/*
845
845
* If we see a failing http code with CURLE_OK, we have turned off
0 commit comments