audioc: do not duplicate E_CREDENTIALS
authorAndre <maan@p133.(none)>
Sun, 11 Jun 2006 08:17:48 +0000 (10:17 +0200)
committerAndre <maan@p133.(none)>
Sun, 11 Jun 2006 08:17:48 +0000 (10:17 +0200)
audioc.c
error.h

index afff14a..0b0d2fb 100644 (file)
--- a/audioc.c
+++ b/audioc.c
@@ -122,8 +122,8 @@ int main(int argc, char *argv[])
        if (connect(fd, (struct sockaddr *)&unix_addr, UNIX_PATH_MAX) < 0)
                goto out;
        fprintf(stderr, "loaded: %d\n", loaded);
-       ret = -E_CREDENTIALS;
-       if (send_cred_buffer(fd, args) < 0)
+       ret = send_cred_buffer(fd, args);
+       if (ret < 0)
                goto out;
        for (;;) {
                int max_fileno = -1, check_write = 0;
diff --git a/error.h b/error.h
index 285191c..7d10ff2 100644 (file)
--- a/error.h
+++ b/error.h
@@ -97,7 +97,6 @@ extern const char **para_errlist[];
        PARA_ERROR(AUDIOC_WRITE, "audioc write error"), \
        PARA_ERROR(INIT_SOCK_ADDR, "can not init socket"), \
        PARA_ERROR(AUDIOC_CONNECT, "audioc connect error"), \
-       PARA_ERROR(CREDENTIALS, "failed to send unix socket credentials"), \
        PARA_ERROR(AUDIOC_OVERRUN, "audioc buffer overrun"), \