diff options
| author | Lennart Poettering <lennart@poettering.net> | 2009-02-03 03:35:23 +0100 | 
|---|---|---|
| committer | Lennart Poettering <lennart@poettering.net> | 2009-02-03 03:35:23 +0100 | 
| commit | ebcbcb174bd65aa5aad944337573b1057b68f7ea (patch) | |
| tree | 199832407350020e633592ff0044a0f8a01d9e2e | |
| parent | 50e6cf858926670d435e328e8c22d8314a392fa1 (diff) | |
register a few new PA error codes
| -rw-r--r-- | src/pulse.c | 21 | 
1 files changed, 18 insertions, 3 deletions
| diff --git a/src/pulse.c b/src/pulse.c index 91aee9c..77a6c87 100644 --- a/src/pulse.c +++ b/src/pulse.c @@ -166,12 +166,27 @@ static int translate_error(int error) {          [PA_ERR_BADSTATE]             = CA_ERROR_STATE,          [PA_ERR_NODATA]               = CA_ERROR_IO,          [PA_ERR_VERSION]              = CA_ERROR_NOTSUPPORTED, -        [PA_ERR_TOOLARGE]             = CA_ERROR_TOOBIG +        [PA_ERR_TOOLARGE]             = CA_ERROR_TOOBIG, +#ifdef PA_ERR_NOTSUPPORTED +        [PA_ERR_NOTSUPPORTED]         = CA_ERROR_NOTSUPPORTED, +#endif +#ifdef PA_ERR_UNKNOWN +        [PA_ERR_UNKNOWN]              = CA_ERROR_IO, +#endif +#ifdef PA_ERR_NOEXTENSION +        [PA_ERR_NOEXTENSION]          = CA_ERROR_NOTSUPPORTED, +#endif +#ifdef PA_ERR_OBSOLETE +        [PA_ERR_OBSOLETE]             = CA_ERROR_NOTSUPPORTED, +#endif +#ifdef PA_ERR_NOTIMPLEMENTED +        [PA_ERR_NOTIMPLEMENTED]       = CA_ERROR_NOTSUPPORTED +#endif      };      ca_assert(error >= 0); -    if (error >= PA_ERR_MAX) +    if (error >= PA_ERR_MAX || !table[error])          return CA_ERROR_IO;      return table[error]; @@ -572,7 +587,7 @@ static void stream_write_cb(pa_stream *s, size_t bytes, void *userdata) {              goto finish;          } -	data = NULL; +        data = NULL;          bytes -= rbytes;      } | 
