diff --git a/src/invoker/invokelib.c b/src/invoker/invokelib.c index 18895d1..6491699 100644 --- a/src/invoker/invokelib.c +++ b/src/invoker/invokelib.c @@ -53,32 +53,3 @@ bool invoke_send_str(int fd, char *str) return write(fd, str, size) != -1; } -char* invoke_recv_str(int fd) -{ - int size = 0; - char *str; - - /* Get the size. */ - invoke_recv_msg(fd, (uint32_t*) &size); - str = (char*)malloc(size); - if (!str) - { - error("mallocing in %s\n", __FUNCTION__); - return NULL; - } - - /* Get the string. */ - int ret = read(fd, str, size); - if (ret < size) - { - error("getting string, got %u of %u bytes\n", ret, size); - free(str); - return NULL; - } - str[size - 1] = '\0'; - - debug("%s: '%s'\n", __FUNCTION__, str); - - return str; -} - diff --git a/src/invoker/invokelib.h b/src/invoker/invokelib.h index f216123..1cb93f7 100644 --- a/src/invoker/invokelib.h +++ b/src/invoker/invokelib.h @@ -27,7 +27,6 @@ bool invoke_send_msg(int fd, uint32_t msg); bool invoke_recv_msg(int fd, uint32_t *msg); bool invoke_send_str(int fd, char *str); -char *invoke_recv_str(int fd); /* FIXME: Should be '/var/run/'. */ //#define INVOKER_SOCK "/tmp/."PACKAGE