diff options
author | Max Kellermann <max@duempel.org> | 2009-03-01 13:35:44 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-03-01 13:35:44 +0100 |
commit | 92db09fdf8d672fa6c78e726102ad66145d076f4 (patch) | |
tree | 7452b17bd5f664904f09d8665ff9c8d55887b6d2 | |
parent | f2664e329f8e85281b7676d3cd543973408607d0 (diff) | |
download | mpd-92db09fdf8d672fa6c78e726102ad66145d076f4.tar.gz mpd-92db09fdf8d672fa6c78e726102ad66145d076f4.tar.xz mpd-92db09fdf8d672fa6c78e726102ad66145d076f4.zip |
listen: return GError on "unix path too long"
When the unix domain socket path is too long, don't abort with
g_error().
Diffstat (limited to '')
-rw-r--r-- | src/listen.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/listen.c b/src/listen.c index 25801a24c..616466330 100644 --- a/src/listen.c +++ b/src/listen.c @@ -337,8 +337,11 @@ listen_add_path(const char *path, GError **error) bool success; path_length = strlen(path); - if (path_length >= sizeof(s_un.sun_path)) - g_error("unix socket path is too long"); + if (path_length >= sizeof(s_un.sun_path)) { + g_set_error(error, listen_quark(), 0, + "unix socket path is too long"); + return false; + } unlink(path); |