-/* -*- mode: C; c-file-style: "gnu" -*- */
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/* dbus-server-unix.c Server implementation for Unix network protocols.
*
* Copyright (C) 2002, 2003, 2004 Red Hat Inc.
*
* 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
*
*/
* Sets error if the result is not OK.
*
* @param entry an address entry
- * @param a new DBusServer, or #NULL on failure.
+ * @param server_p location to store a new DBusServer, or #NULL on failure.
* @param error location to store rationale for failure on bad address
* @returns the outcome
*
if (path == NULL && tmpdir == NULL && abstract == NULL)
{
- _dbus_server_set_bad_address(error, "unix",
- "path or tmpdir or abstract",
- NULL);
+ _dbus_set_bad_address(error, "unix",
+ "path or tmpdir or abstract",
+ NULL);
return DBUS_SERVER_LISTEN_BAD_ADDRESS;
}
(path && abstract) ||
(tmpdir && abstract))
{
- _dbus_server_set_bad_address(error, NULL, NULL,
- "cannot specify two of \"path\" and \"tmpdir\" and \"abstract\" at the same time");
+ _dbus_set_bad_address(error, NULL, NULL,
+ "cannot specify two of \"path\" and \"tmpdir\" and \"abstract\" at the same time");
return DBUS_SERVER_LISTEN_BAD_ADDRESS;
}
}
listen_fd = _dbus_listen_unix_socket (path, abstract, error);
- _dbus_fd_set_close_on_exec (listen_fd);
-
+
if (listen_fd < 0)
{
_DBUS_ASSERT_ERROR_IS_SET (error);
goto failed_1;
}
- server = _dbus_server_new_for_socket (listen_fd, &address);
+ server = _dbus_server_new_for_socket (&listen_fd, 1, &address);
if (server == NULL)
{
dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);