~diwic/ubuntu/lucid/pulseaudio/bugfixes

« back to all changes in this revision

Viewing changes to src/pulse/error.c

  • Committer: Bazaar Package Importer
  • Author(s): Luke Yelavich
  • Date: 2008-11-04 15:46:00 UTC
  • mfrom: (1.2.1 upstream) (1.1.6 lenny)
  • Revision ID: james.westby@ubuntu.com-20081104154600-hlzknpcazaam0nxm
Tags: 0.9.13-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Don't build against, and create jack package. Jack is not in main.
  - Remove --disable-per-user-esound-socket from configure flags, as we still
    want per user esound sockets.
  - Remove stop links from rc0 and rc6.
  - Change default resample algorithm and bubffer size.
  - Add alsa configuration files to route alsa applications via pulseaudio.
  - Move libasound2-plugins from Recommends to Depends.
* debian/pulseaudio.preinst: When upgrading from intrepid, remove
  /etc/X11/Xsession.d/70pulseaudio, as this was used to minimize a race
  condition when starting GNOME in intrepid. This race should not exist in
  jaunty once libcanberra is built to use pulseaudio as a backend.
* Do not spawn a pulseaudio server if clients fail to find a running server.
* Remove explicit version dependency for libspeex-dev to allow the package
  to be built for now.
* Regenerate autotools files to work with Ubuntu's newer libtool/libltdl.
* debian/control: libpulsecore5 -> libpulsecore8 to match the library
  soname.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: error.c 1426 2007-02-13 15:35:19Z ossman $ */
2
 
 
3
1
/***
4
2
  This file is part of PulseAudio.
5
3
 
32
30
#include <string.h>
33
31
 
34
32
#include <pulse/xmalloc.h>
 
33
#include <pulse/i18n.h>
35
34
 
36
35
#include <pulsecore/core-util.h>
37
36
#include <pulsecore/native-common.h>
41
40
const char*pa_strerror(int error) {
42
41
 
43
42
    static const char* const errortab[PA_ERR_MAX] = {
44
 
        [PA_OK] = "OK",
45
 
        [PA_ERR_ACCESS] = "Access denied",
46
 
        [PA_ERR_COMMAND] = "Unknown command",
47
 
        [PA_ERR_INVALID] = "Invalid argument",
48
 
        [PA_ERR_EXIST] = "Entity exists",
49
 
        [PA_ERR_NOENTITY] = "No such entity",
50
 
        [PA_ERR_CONNECTIONREFUSED] = "Connection refused",
51
 
        [PA_ERR_PROTOCOL] = "Protocol error",
52
 
        [PA_ERR_TIMEOUT] = "Timeout",
53
 
        [PA_ERR_AUTHKEY] = "No authorization key",
54
 
        [PA_ERR_INTERNAL] = "Internal error",
55
 
        [PA_ERR_CONNECTIONTERMINATED] = "Connection terminated",
56
 
        [PA_ERR_KILLED] = "Entity killed",
57
 
        [PA_ERR_INVALIDSERVER] = "Invalid server",
58
 
        [PA_ERR_MODINITFAILED] = "Module initalization failed",
59
 
        [PA_ERR_BADSTATE] = "Bad state",
60
 
        [PA_ERR_NODATA] = "No data",
61
 
        [PA_ERR_VERSION] = "Incompatible protocol version",
62
 
        [PA_ERR_TOOLARGE] = "Too large"
 
43
        [PA_OK] = N_("OK"),
 
44
        [PA_ERR_ACCESS] = N_("Access denied"),
 
45
        [PA_ERR_COMMAND] = N_("Unknown command"),
 
46
        [PA_ERR_INVALID] = N_("Invalid argument"),
 
47
        [PA_ERR_EXIST] = N_("Entity exists"),
 
48
        [PA_ERR_NOENTITY] = N_("No such entity"),
 
49
        [PA_ERR_CONNECTIONREFUSED] = N_("Connection refused"),
 
50
        [PA_ERR_PROTOCOL] = N_("Protocol error"),
 
51
        [PA_ERR_TIMEOUT] = N_("Timeout"),
 
52
        [PA_ERR_AUTHKEY] = N_("No authorization key"),
 
53
        [PA_ERR_INTERNAL] = N_("Internal error"),
 
54
        [PA_ERR_CONNECTIONTERMINATED] = N_("Connection terminated"),
 
55
        [PA_ERR_KILLED] = N_("Entity killed"),
 
56
        [PA_ERR_INVALIDSERVER] = N_("Invalid server"),
 
57
        [PA_ERR_MODINITFAILED] = N_("Module initalization failed"),
 
58
        [PA_ERR_BADSTATE] = N_("Bad state"),
 
59
        [PA_ERR_NODATA] = N_("No data"),
 
60
        [PA_ERR_VERSION] = N_("Incompatible protocol version"),
 
61
        [PA_ERR_TOOLARGE] = N_("Too large"),
 
62
        [PA_ERR_NOTSUPPORTED] = N_("Not supported"),
 
63
        [PA_ERR_UNKNOWN] = N_("Unknown error code"),
 
64
        [PA_ERR_NOEXTENSION] = N_("No such extension")
63
65
    };
64
66
 
 
67
    pa_init_i18n();
 
68
 
65
69
    if (error < 0 || error >= PA_ERR_MAX)
66
70
        return NULL;
67
71
 
68
 
    return errortab[error];
 
72
    return _(errortab[error]);
69
73
}