コード例 #1
0
ファイル: flom_handle.c プロジェクト: 3manuek/flom
int flom_handle_set_socket_name(flom_handle_t *handle, const char *value)
{
    FLOM_TRACE(("flom_handle_set_socket_name: "
                "old value='%s', new value='%s'\n",
                STRORNULL(flom_config_get_socket_name(handle->config)),
                STRORNULL(value)));
    /* reset unicast and multicast addresses */
    if (NULL != value) {
        flom_handle_set_unicast_address(handle, NULL);
        flom_handle_set_multicast_address(handle, NULL);
    } /* if (NULL != value) */
    return flom_config_set_socket_name(handle->config, (const gchar *)value);
}
コード例 #2
0
ファイル: flom_handle.c プロジェクト: tiian/flom
int flom_handle_set_socket_name(flom_handle_t *handle, const char *value)
{
    FLOM_TRACE(("flom_handle_set_socket_name: "
                "old value='%s', new value='%s'\n",
                STRORNULL(flom_config_get_socket_name(handle->config)),
                STRORNULL(value)));
    switch (handle->state) {
        case FLOM_HANDLE_STATE_INIT:
        case FLOM_HANDLE_STATE_DISCONNECTED:
            /* reset unicast and multicast addresses */
            if (NULL != value) {
                flom_handle_set_unicast_address(handle, NULL);
                flom_handle_set_multicast_address(handle, NULL);
            } /* if (NULL != value) */
            return flom_config_set_socket_name(handle->config,
                                               (const gchar *)value);
            break;
        default:
            FLOM_TRACE(("flom_handle_set_socket_name: state %d " \
                        "is not compatible with set operation\n",
                        handle->state));
    } /* switch (handle->state) */
    return FLOM_RC_API_IMMUTABLE_HANDLE;
}
コード例 #3
0
ファイル: flom_handle.c プロジェクト: tiian/flom
const char *flom_handle_get_socket_name(const flom_handle_t *handle)
{
    FLOM_TRACE(("flom_handle_get_socket_name: value='%s'\n",
                STRORNULL(flom_config_get_socket_name(handle->config))));
    return (const char *)flom_config_get_socket_name(handle->config);
}