/* =============== CL_StartNextHTTPDownload Start another HTTP download if possible. =============== */ static void CL_StartNextHTTPDownload (void) { dlqueue_t *q; q = &cls.downloadQueue; while (q->next) { q = q->next; if (q->state == DLQ_STATE_NOT_STARTED) { size_t len; dlhandle_t *dl; dl = CL_GetFreeDLHandle(); if (!dl) return; CL_StartHTTPDownload (q, dl); //ugly hack for pak file single downloading len = strlen (q->quakePath); if (len > 4 && !Q_stricmp (q->quakePath + len - 4, ".pak")) downloading_pak = true; break; } } }
/** * @brief Start another HTTP download if possible. * @sa CL_RunHTTPDownloads */ static void CL_StartNextHTTPDownload (void) { for (dlqueue_t* q = cls.downloadQueue; q; q = q->next) { if (q->state == DLQ_STATE_NOT_STARTED) { size_t len; dlhandle_t *dl = CL_GetFreeDLHandle(); if (!dl) return; CL_StartHTTPDownload(q, dl); /* ugly hack for pk3 file single downloading */ len = strlen(q->ufoPath); if (len > 4 && !Q_strcasecmp(q->ufoPath + len - 4, ".pk3")) downloadingPK3 = true; break; } } }