Handle 0x0d0a EOLs in spawn_dbus_daemon()

On W32 dbus daemon will print output in text mode, with 0x0d0a EOLs instead
of just 0x0a. Be able to handle that.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=75863
Reviewed-by: Simon McVittie
This commit is contained in:
Руслан Ижбулатов 2014-03-08 04:18:43 +00:00 committed by Simon McVittie
parent c02ac70566
commit 28812c885f
2 changed files with 4 additions and 0 deletions

View file

@ -151,6 +151,8 @@ spawn_dbus_daemon (gchar *binary,
if (newline != NULL)
{
if ((newline > address->str) && ('\r' == newline[-1]))
newline -= 1;
g_string_truncate (address, newline - address->str);
break;
}

View file

@ -119,6 +119,8 @@ spawn_dbus_daemon (gchar *binary,
if (newline != NULL)
{
if ((newline > address->str) && ('\r' == newline[-1]))
newline -= 1;
g_string_truncate (address, newline - address->str);
break;
}