Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/vere/io/mesa.c
Original file line number Diff line number Diff line change
Expand Up @@ -2559,7 +2559,7 @@ _mesa_hear_page(u3_mesa_pict* pic_u, sockaddr_in lan_u)

_mesa_add_hop(pac_u->hed_u.hop_y, &pac_u->hed_u, &pac_u->pag_u, lan_u);

_mesa_send_pact(sam_u, pin_u->adr_u, per_u, pac_u);
_mesa_send_pact(sam_u, pin_u->adr_u, NULL, pac_u);
_mesa_del_pit(sam_u, nam_u);
return;
}
Expand Down
10 changes: 5 additions & 5 deletions pkg/vere/king.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ king_curl_alloc(void* dat_v, size_t uni_t, size_t mem_t, void* buf_v)
/* king_curl_bytes(): HTTP GET url_c, produce response body bytes.
*/
c3_i
king_curl_bytes(c3_c* url_c, c3_w* len_w, c3_y** hun_y, c3_t veb_t)
king_curl_bytes(c3_c* url_c, c3_w* len_w, c3_y** hun_y, c3_t veb_t, c3_y tri_y)
{
c3_i ret_i = 0;
CURL *cul_u;
Expand All @@ -312,7 +312,7 @@ king_curl_bytes(c3_c* url_c, c3_w* len_w, c3_y** hun_y, c3_t veb_t)
curl_easy_setopt(cul_u, CURLOPT_WRITEDATA, (void*)&buf_u);
curl_easy_setopt(cul_u, CURLOPT_SERVER_RESPONSE_TIMEOUT, 30);

while ( 5 > try_y ) {
while ( tri_y > try_y ) {
sleep(try_y++);
res_i = curl_easy_perform(cul_u);
curl_easy_getinfo(cul_u, CURLINFO_RESPONSE_CODE, &cod_i);
Expand Down Expand Up @@ -353,7 +353,7 @@ _king_get_atom(c3_c* url_c)
c3_y* hun_y;
u3_noun pro;

if ( king_curl_bytes(url_c, &len_w, &hun_y, 1) ) {
if ( king_curl_bytes(url_c, &len_w, &hun_y, 1, 5) ) {
u3_king_bail();
exit(1);
}
Expand Down Expand Up @@ -433,7 +433,7 @@ u3_king_next(c3_c* pac_c, c3_c** out_c)
// skip printfs on failed requests (/next is usually not present)
//REVIEW new retry logic means this case will take longer. make retries optional?
//
if ( king_curl_bytes(url_c, &len_w, &hun_y, 0) ) {
if ( king_curl_bytes(url_c, &len_w, &hun_y, 0, 5) ) {
c3_free(url_c);

ret_i = asprintf(&url_c, "%s/%s/last", ver_hos_c, pac_c);
Expand All @@ -442,7 +442,7 @@ u3_king_next(c3_c* pac_c, c3_c** out_c)
// enable printfs on failed requests (/last must be present)
// XX support channel redirections
//
if ( king_curl_bytes(url_c, &len_w, &hun_y, 1) )
if ( king_curl_bytes(url_c, &len_w, &hun_y, 1, 5) )
{
c3_free(url_c);
return -2;
Expand Down
4 changes: 2 additions & 2 deletions pkg/vere/pier.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ _resolve_czar(u3_work* wok_u, c3_c* who_c)

sprintf(url, "https://%s.urbit.org/~/sponsor/%s", czar_c+1, who_c);

c3_i ret_i = king_curl_bytes(url, &len_w, &hun_y, 1);
c3_i ret_i = king_curl_bytes(url, &len_w, &hun_y, 1, 1);
if (!ret_i) {
c3_free(czar_c);
czar_c = (c3_c*)hun_y;
Expand Down Expand Up @@ -574,7 +574,7 @@ _czar_boot_data(c3_c* czar_c,
}

c3_o ret_o = c3n;
c3_i ret_i = king_curl_bytes(url, &len_w, &hun_y, 1);
c3_i ret_i = king_curl_bytes(url, &len_w, &hun_y, 1, 1);
if ( !ret_i ) {
u3_noun jamd = u3i_bytes(len_w, hun_y);
u3_noun cued = u3qe_cue(jamd);
Expand Down
2 changes: 1 addition & 1 deletion pkg/vere/vere.h
Original file line number Diff line number Diff line change
Expand Up @@ -1597,7 +1597,7 @@
/* king_curl_bytes(): HTTP GET url_c, produce response body bytes.
*/
c3_i
king_curl_bytes(c3_c* url_c, c3_w* len_w, c3_y** hun_y, c3_t veb_t);
king_curl_bytes(c3_c* url_c, c3_w* len_w, c3_y** hun_y, c3_t veb_t, c3_y tri_y);

/* u3_write_fd(): retry interrupts, continue partial writes, assert errors.
*/
Expand Down