summaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2021-09-03 00:20:21 +0000
committerLaurent Bercot <ska@appnovation.com>2021-09-03 00:20:21 +0000
commita043afde089c60db08f6f9e246dda18a16e4b3e8 (patch)
tree3e81cf37060e17966200283b0b587588bd7c2005 /src/rpc
parent5ca66151f5f5916f843ea64d05fc460c602cc753 (diff)
downloadskabus-a043afde089c60db08f6f9e246dda18a16e4b3e8.tar.xz
More errno fixes
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/skabus-rpcd.h6
-rw-r--r--src/rpc/skabus_rpcd_client.c4
-rw-r--r--src/rpc/skabus_rpcd_interface.c4
-rw-r--r--src/rpc/skabus_rpcd_query.c6
4 files changed, 10 insertions, 10 deletions
diff --git a/src/rpc/skabus-rpcd.h b/src/rpc/skabus-rpcd.h
index e9b63fe..394c4c7 100644
--- a/src/rpc/skabus-rpcd.h
+++ b/src/rpc/skabus-rpcd.h
@@ -113,9 +113,9 @@ extern unsigned int sentinel ;
#define numconn (genset_n(clients) - 1)
extern void query_remove (uint32_t) ;
-extern void query_fail (uint32_t, char) ;
-extern int query_cancel (uint32_t, char) ;
-extern int query_cancelremove (uint32_t, char) ;
+extern void query_fail (uint32_t, unsigned char) ;
+extern int query_cancel (uint32_t, unsigned char) ;
+extern int query_cancelremove (uint32_t, unsigned char) ;
extern int query_lookup_by_serial (uint64_t, uint32_t *) ;
extern int query_lookup_by_mindeadline (uint32_t *) ;
extern void query_get_mindeadline (tain *) ;
diff --git a/src/rpc/skabus_rpcd_client.c b/src/rpc/skabus_rpcd_client.c
index 198f0da..d5397e4 100644
--- a/src/rpc/skabus_rpcd_client.c
+++ b/src/rpc/skabus_rpcd_client.c
@@ -46,13 +46,13 @@ static inline void client_delete (uint32_t i, uint32_t prev)
static int query_cancelremove_iter (char *s, void *reason)
{
uint32_t i = *(uint32_t *)s ;
- return query_cancelremove(i, *(char *)reason) ;
+ return query_cancelremove(i, *(unsigned char *)reason) ;
}
void client_remove (uint32_t i, uint32_t prev)
{
client_t *c = CLIENT(i) ;
- char reason = ECONNABORTED ;
+ unsigned char reason = ECONNABORTED ;
if (gensetdyn_iter(&c->queries, &query_cancelremove_iter, &reason) < gensetdyn_n(&c->queries))
strerr_diefu1sys(111, "query_cancelremove_iter in client_remove") ;
while (genalloc_len(uint32_t, &c->interfaces))
diff --git a/src/rpc/skabus_rpcd_interface.c b/src/rpc/skabus_rpcd_interface.c
index bf5c7e0..ac9cf46 100644
--- a/src/rpc/skabus_rpcd_interface.c
+++ b/src/rpc/skabus_rpcd_interface.c
@@ -47,7 +47,7 @@ static inline void interface_delete (uint32_t i)
static int query_fail_iter (char *s, void *reason)
{
uint32_t i = *(uint32_t *)s ;
- query_fail(i, *(char *)reason) ;
+ query_fail(i, *(unsigned char *)reason) ;
return 1 ;
}
@@ -63,7 +63,7 @@ void interface_remove (uint32_t i)
interface_t *y = INTERFACE(i) ;
client_t *c = CLIENT(y->client) ;
uint32_t n = gensetdyn_n(&y->queries) ;
- char reason = ECONNRESET ;
+ unsigned char reason = ECONNRESET ;
gensetdyn_iter(&y->queries, &query_fail_iter, &reason) ;
n = genalloc_len(uint32_t, &c->interfaces) ;
client_interfacemove(c, n-1, y->index) ;
diff --git a/src/rpc/skabus_rpcd_query.c b/src/rpc/skabus_rpcd_query.c
index 13f3ebe..a9271c2 100644
--- a/src/rpc/skabus_rpcd_query.c
+++ b/src/rpc/skabus_rpcd_query.c
@@ -68,7 +68,7 @@ void query_remove (uint32_t i)
query_delete(i) ;
}
-void query_fail (uint32_t i, char status)
+void query_fail (uint32_t i, unsigned char status)
{
query_t *q = QUERY(i) ;
client_t *c = CLIENT(q->client) ;
@@ -82,7 +82,7 @@ void query_fail (uint32_t i, char status)
client_setdeadline(c) ;
}
-int query_cancel (uint32_t i, char reason)
+int query_cancel (uint32_t i, unsigned char reason)
{
query_t *q = QUERY(i) ;
interface_t *y = INTERFACE(q->interface) ;
@@ -97,7 +97,7 @@ int query_cancel (uint32_t i, char reason)
return 1 ;
}
-int query_cancelremove (uint32_t i, char reason)
+int query_cancelremove (uint32_t i, unsigned char reason)
{
if (!query_cancel(i, reason)) return 0 ;
query_remove(i) ;