Exemplo n.º 1
0
void cass_cluster_set_credentials(CassCluster* cluster,
                                  const char* username,
                                  const char* password) {
  return cass_cluster_set_credentials_n(cluster,
                                        username, SAFE_STRLEN(username),
                                        password, SAFE_STRLEN(password));
}
Exemplo n.º 2
0
/****************************************************************************
 * tbs_acl_id_size
 * Calculate size of a tbs_acl_id_t
 * IN    id_p               id entry
 */
STATIC size_t
tbs_acl_id_size(tbs_acl_id_t *id_p)
{
    size_t size = 0;

    size += sizeof(id_p->kind) +
            SAFE_STRLEN(id_p->domain) + 
            SAFE_STRLEN(id_p->name);

    return size;
}
Exemplo n.º 3
0
CassError cass_statement_bind_string_by_name_n(CassStatement* statement,
                                               const char* name,
                                               size_t name_length,
                                               const char* value,
                                               size_t value_length) {
  return statement->set(cass::StringRef(name, name_length),
                        cass::CassString(value, SAFE_STRLEN(value)));
}
Exemplo n.º 4
0
CassFuture* cass_session_connect_keyspace(CassSession* session,
                                          const CassCluster* cluster,
                                          const char* keyspace) {
  return cass_session_connect_keyspace_n(session,
                                         cluster,
                                         keyspace,
                                         SAFE_STRLEN(keyspace));
}
Exemplo n.º 5
0
CassError cass_cluster_set_load_balance_dc_aware(CassCluster* cluster,
                                                 const char* local_dc,
                                                 unsigned used_hosts_per_remote_dc,
                                                 cass_bool_t allow_remote_dcs_for_local_cl) {
  if (local_dc == NULL) {
    return CASS_ERROR_LIB_BAD_PARAMS;
  }
  return cass_cluster_set_load_balance_dc_aware_n(cluster,
                                                  local_dc,
                                                  SAFE_STRLEN(local_dc),
                                                  used_hosts_per_remote_dc,
                                                  allow_remote_dcs_for_local_cl);
}
Exemplo n.º 6
0
int RTK_SYS2AP_SendMsg(SYS2AP_MESSAGE *Msg)
{
    int msgid;
    
    if(RTK_SYS2AP_Get_Msgid(&msgid)==-1)
        return -1;
    
    if (msgsnd(msgid,Msg,(SAFE_STRLEN(Msg->m_msg)+1),0)==-1)
    {
        printf("msgsnd fail errno = %d , errstr=%s\n",errno,strerror(errno));
        return -1;
    }
    return 0;
}
Exemplo n.º 7
0
CassError cass_statement_set_keyspace(CassStatement* statement, const char* keyspace) {
  return cass_statement_set_keyspace_n(statement, keyspace, SAFE_STRLEN(keyspace));
}
Exemplo n.º 8
0
CassStatement* cass_statement_new(const char* query,
                                  size_t parameter_count) {
  return cass_statement_new_n(query, SAFE_STRLEN(query), parameter_count);
}
Exemplo n.º 9
0
CassError cass_statement_bind_string_by_name(CassStatement* statement,
                                             const char* name,
                                             const char* value) {
  return statement->set(cass::StringRef(name),
                        cass::CassString(value, SAFE_STRLEN(value)));
}
Exemplo n.º 10
0
CassError cass_statement_bind_string(CassStatement* statement, size_t index,
                                     const char* value) {
  return cass_statement_bind_string_n(statement, index,
                                      value, SAFE_STRLEN(value));
}
Exemplo n.º 11
0
const CassValue* cass_row_get_column_by_name(const CassRow* row,
                                             const char* name) {

  return cass_row_get_column_by_name_n(row, name, SAFE_STRLEN(name));
}
Exemplo n.º 12
0
void cass_cluster_set_blacklist_dc_filtering(CassCluster* cluster,
                                             const char* dcs) {
  cass_cluster_set_blacklist_dc_filtering_n(cluster,
                                            dcs,
                                            SAFE_STRLEN(dcs));
}
Exemplo n.º 13
0
void cass_cluster_set_blacklist_filtering(CassCluster* cluster,
                                          const char* hosts) {
  cass_cluster_set_blacklist_filtering_n(cluster,
                                         hosts,
                                         SAFE_STRLEN(hosts));
}
Exemplo n.º 14
0
CassError cass_cluster_set_contact_points(CassCluster* cluster,
                                          const char* contact_points) {
  return cass_cluster_set_contact_points_n(cluster,
                                           contact_points,
                                           SAFE_STRLEN(contact_points));
}
Exemplo n.º 15
0
CassFuture* cass_session_prepare(CassSession* session, const char* query) {
  return cass_session_prepare_n(session, query, SAFE_STRLEN(query));
}