server: Replace abort() with NVNC_LOG_PANIC

pull/80/head
Andri Yngvason 2022-10-24 09:16:59 +00:00
parent 3c4a069ba2
commit 3588670c81
1 changed files with 5 additions and 6 deletions

View File

@ -742,7 +742,7 @@ static void process_fb_update_requests(struct nvnc_client* client)
pixman_region_fini(&damage); pixman_region_fini(&damage);
} else { } else {
abort(); nvnc_log(NVNC_LOG_PANIC, "Invalid encoder kind");
} }
} }
@ -1039,7 +1039,7 @@ static int try_read_client_message(struct nvnc_client* client)
return on_client_message(client); return on_client_message(client);
} }
abort(); nvnc_log(NVNC_LOG_PANIC, "Invalid client state");
return 0; return 0;
} }
@ -1232,8 +1232,8 @@ static int bind_address(const char* name, uint16_t port, enum addrtype type)
return bind_address_unix(name); return bind_address_unix(name);
} }
nvnc_log(NVNC_LOG_ERROR, "unknown socket address type"); nvnc_log(NVNC_LOG_PANIC, "Unknown socket address type");
abort(); return -1;
} }
static struct nvnc* open_common(const char* address, uint16_t port, enum addrtype type) static struct nvnc* open_common(const char* address, uint16_t port, enum addrtype type)
@ -1546,8 +1546,7 @@ EXPORT
void nvnc_add_display(struct nvnc* self, struct nvnc_display* display) void nvnc_add_display(struct nvnc* self, struct nvnc_display* display)
{ {
if (self->display) { if (self->display) {
nvnc_log(NVNC_LOG_ERROR, "Multiple displays are not implemented. Aborting!"); nvnc_log(NVNC_LOG_PANIC, "Multiple displays are not implemented. Aborting!");
abort();
} }
display->server = self; display->server = self;