LOCAL void wise_flush_locked() { if (!iRequest || iRequest->numItems == 0) return; inflight += iRequest->numItems; if (moloch_http_send(wiseService, "POST", "/get", 4, iBuf, BSB_LENGTH(iRequest->bsb), NULL, TRUE, wise_cb, iRequest) != 0) { LOG("Wise - request failed %p for %d items", iRequest, iRequest->numItems); wise_cb(500, NULL, 0, iRequest); } iRequest = 0; iBuf = 0; }
gboolean wise_flush(gpointer UNUSED(user_data)) { if (!iRequest || iRequest->numItems == 0) return TRUE; inflight += iRequest->numItems; if (moloch_http_send(wiseService, "POST", "/get", 4, iBuf, BSB_LENGTH(iRequest->bsb), NULL, TRUE, wise_cb, iRequest) != 0) { LOG("Wise - request failed %p for %d items", iRequest, iRequest->numItems); wise_cb(NULL, 0, iRequest); } iRequest = 0; iBuf = 0; return TRUE; }