[daemon-fix] Registering starters: unwanted release_kdbus_name when no error was...
[platform/upstream/dbus.git] / bus / activation-helper-bin.c
index 6b9ec1f..a360acc 100644 (file)
@@ -18,7 +18,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  *
  */
 
@@ -56,7 +56,15 @@ convert_error_to_exit_code (DBusError *error)
   if (dbus_error_has_name (error, DBUS_ERROR_SPAWN_EXEC_FAILED))
     return BUS_SPAWN_EXIT_CODE_EXEC_FAILED;
 
+  if (dbus_error_has_name (error, DBUS_ERROR_INVALID_ARGS))
+    return BUS_SPAWN_EXIT_CODE_INVALID_ARGS;
+
+  if (dbus_error_has_name (error, DBUS_ERROR_SPAWN_CHILD_SIGNALED))
+    return BUS_SPAWN_EXIT_CODE_CHILD_SIGNALED;
+  
   /* should we assert? */
+  fprintf(stderr, "%s: %s\n", error->name, error->message);
+  
   return BUS_SPAWN_EXIT_CODE_SETUP_FAILED;
 }