MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / FetchFlagsTask_DownloadNext

Function FetchFlagsTask_DownloadNext

src/LWeb.c:639–652  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

637}
638
639static void FetchFlagsTask_DownloadNext(void) {
640 cc_string url; char urlBuffer[URL_MAX_SIZE];
641 String_InitArray(url, urlBuffer);
642
643 if (FetchFlagsTask.Base.working) return;
644 if (FetchFlagsTask.count == flagsCount) return;
645
646 LWebTask_Reset(&FetchFlagsTask.Base);
647 String_Format2(&url, RESOURCE_SERVER "/img/flags/%r%r.png",
648 &flags[FetchFlagsTask.count].country[0], &flags[FetchFlagsTask.count].country[1]);
649
650 FetchFlagsTask.Base.Handle = FetchFlagsTask_Handle;
651 FetchFlagsTask.Base.reqID = Http_AsyncGetData(&url, 0);
652}
653
654static void FetchFlagsTask_Ensure(void) {
655 if (flagsCount < flagsCapacity) return;

Callers 2

FetchFlagsTask_HandleFunction · 0.85
FetchFlagsTask_AddFunction · 0.85

Calls 3

LWebTask_ResetFunction · 0.85
String_Format2Function · 0.85
Http_AsyncGetDataFunction · 0.70

Tested by

no test coverage detected