00001 /* 00002 * libsyncml - A syncml protocol implementation 00003 * Copyright (C) 2008-2009 Michael Bell <michael.bell@opensync.org> 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Lesser General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2.1 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public 00016 * License along with this library; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 * 00019 */ 00020 00021 #include "transport.h" 00022 #include "libsyncml/sml_error_internals.h" 00023 #include "libsyncml/sml_support.h" 00024 00025 SmlBool smlDataSyncTransportHttpServerInit( 00026 SmlDataSyncObject *dsObject, 00027 SmlError **error) 00028 { 00029 smlTrace(TRACE_ENTRY, "%s(%p, %p)", __func__, dsObject, error); 00030 CHECK_ERROR_REF 00031 00032 if (dsObject->url != NULL && 00033 !smlTransportSetConfigOption( 00034 dsObject->tsp, 00035 SML_TRANSPORT_CONFIG_URL, dsObject->url, 00036 error)) 00037 goto error; 00038 00039 smlTrace(TRACE_EXIT, "%s - TRUE", __func__); 00040 return TRUE; 00041 error: 00042 smlTrace(TRACE_EXIT_ERROR, "%s - %s", __func__, smlErrorPrint(error)); 00043 return FALSE; 00044 } 00045