summaryrefslogtreecommitdiff
path: root/src/portal
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2024-12-26 11:25:14 -0500
committerAndrew Opalach <andrew@akon.city> 2024-12-26 11:25:14 -0500
commit9026e7f49f11e920eac666bd4159ec459b979623 (patch)
tree999ae6fdf5ea4dbad5e777818a176a6b2d564553 /src/portal
parent7021f0625cc018af58d61d7875fbeb21b64d99bf (diff)
downloadcamu-9026e7f49f11e920eac666bd4159ec459b979623.tar.gz
camu-9026e7f49f11e920eac666bd4159ec459b979623.tar.bz2
camu-9026e7f49f11e920eac666bd4159ec459b979623.zip
Incomplete buffer errored and sink queued
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'src/portal')
-rw-r--r--src/portal/src/search.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/portal/src/search.c b/src/portal/src/search.c
index 88cf1f1..447e44c 100644
--- a/src/portal/src/search.c
+++ b/src/portal/src/search.c
@@ -63,7 +63,7 @@ static nn_thread_result NNWT_THREADCALL queue_thread(void *userdata)
nn_thread_setcanceltype(NNWT_THREAD_CANCEL_ASYNCHRONOUS);
bool have_python = false;
nn_mutex_lock(&bridge->mutex);
- do {
+ for (;;) {
nn_cond_wait(&bridge->cond, &bridge->mutex);
if (bridge->quit) break;
if (!have_python) {
@@ -127,7 +127,7 @@ static nn_thread_result NNWT_THREADCALL queue_thread(void *userdata)
}
bridge->queue.size = 0;
nn_signal_send(&bridge->results_signal);
- } while (1);
+ }
nn_mutex_unlock(&bridge->mutex);
if (have_python) camu_python_close();
return 0;
@@ -138,11 +138,11 @@ static void results_signal_callback(void *userdata)
struct camu_portal_bridge *bridge = (struct camu_portal_bridge *)userdata;
u32 size;
struct camu_portal_result result;
- do {
+ for (;;) {
camu_queue_try_pop(bridge->results, size, result);
if (size == 0) break;
result.callback(bridge->userdata, result.userdata, &result);
- } while (1);
+ }
}
void camu_portal_init(struct camu_portal_bridge *bridge, struct camu_post_cache *cache,