Changeset 1417 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
- Timestamp:
- Aug 16, 2007 10:11:44 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
r1405 r1417 55 55 56 56 57 PJ_DEF(void) pjsua_logging_config_default(pjsua_logging_config *cfg) 58 { 59 pj_bzero(cfg, sizeof(*cfg)); 60 61 cfg->msg_logging = PJ_TRUE; 62 cfg->level = 5; 63 cfg->console_level = 4; 64 cfg->decor = PJ_LOG_HAS_SENDER | PJ_LOG_HAS_TIME | 65 PJ_LOG_HAS_MICRO_SEC | PJ_LOG_HAS_NEWLINE; 66 } 67 68 PJ_DEF(void) pjsua_logging_config_dup(pj_pool_t *pool, 69 pjsua_logging_config *dst, 70 const pjsua_logging_config *src) 71 { 72 pj_memcpy(dst, src, sizeof(*src)); 73 pj_strdup_with_null(pool, &dst->log_filename, &src->log_filename); 74 } 75 76 PJ_DEF(void) pjsua_config_default(pjsua_config *cfg) 77 { 78 pj_bzero(cfg, sizeof(*cfg)); 79 80 cfg->max_calls = 4; 81 cfg->thread_cnt = 1; 82 } 83 84 PJ_DEF(void) pjsip_cred_dup( pj_pool_t *pool, 85 pjsip_cred_info *dst, 86 const pjsip_cred_info *src) 87 { 88 pj_strdup_with_null(pool, &dst->realm, &src->realm); 89 pj_strdup_with_null(pool, &dst->scheme, &src->scheme); 90 pj_strdup_with_null(pool, &dst->username, &src->username); 91 pj_strdup_with_null(pool, &dst->data, &src->data); 92 } 93 94 PJ_DEF(void) pjsua_config_dup(pj_pool_t *pool, 95 pjsua_config *dst, 96 const pjsua_config *src) 97 { 98 unsigned i; 99 100 pj_memcpy(dst, src, sizeof(*src)); 101 102 for (i=0; i<src->outbound_proxy_cnt; ++i) { 103 pj_strdup_with_null(pool, &dst->outbound_proxy[i], 104 &src->outbound_proxy[i]); 105 } 106 107 for (i=0; i<src->cred_count; ++i) { 108 pjsip_cred_dup(pool, &dst->cred_info[i], &src->cred_info[i]); 109 } 110 111 pj_strdup_with_null(pool, &dst->user_agent, &src->user_agent); 112 pj_strdup_with_null(pool, &dst->stun_domain, &src->stun_domain); 113 pj_strdup_with_null(pool, &dst->stun_host, &src->stun_host); 114 pj_strdup_with_null(pool, &dst->stun_relay_host, &src->stun_relay_host); 115 } 116 117 PJ_DEF(void) pjsua_msg_data_init(pjsua_msg_data *msg_data) 118 { 119 pj_bzero(msg_data, sizeof(*msg_data)); 120 pj_list_init(&msg_data->hdr_list); 121 } 122 123 PJ_DEF(void) pjsua_transport_config_default(pjsua_transport_config *cfg) 124 { 125 pj_bzero(cfg, sizeof(*cfg)); 126 pjsip_tls_setting_default(&cfg->tls_setting); 127 } 128 129 PJ_DEF(void) pjsua_transport_config_dup(pj_pool_t *pool, 130 pjsua_transport_config *dst, 131 const pjsua_transport_config *src) 132 { 133 PJ_UNUSED_ARG(pool); 134 pj_memcpy(dst, src, sizeof(*src)); 135 } 136 137 PJ_DEF(void) pjsua_acc_config_default(pjsua_acc_config *cfg) 138 { 139 pj_bzero(cfg, sizeof(*cfg)); 140 141 cfg->reg_timeout = PJSUA_REG_INTERVAL; 142 cfg->transport_id = PJSUA_INVALID_ID; 143 } 144 145 PJ_DEF(void) pjsua_buddy_config_default(pjsua_buddy_config *cfg) 146 { 147 pj_bzero(cfg, sizeof(*cfg)); 148 } 149 150 PJ_DEF(void) pjsua_media_config_default(pjsua_media_config *cfg) 151 { 152 pj_bzero(cfg, sizeof(*cfg)); 153 154 cfg->clock_rate = PJSUA_DEFAULT_CLOCK_RATE; 155 cfg->max_media_ports = 32; 156 cfg->has_ioqueue = PJ_TRUE; 157 cfg->thread_cnt = 1; 158 cfg->quality = PJSUA_DEFAULT_CODEC_QUALITY; 159 cfg->ilbc_mode = PJSUA_DEFAULT_ILBC_MODE; 160 cfg->ec_tail_len = PJSUA_DEFAULT_EC_TAIL_LEN; 161 cfg->jb_init = cfg->jb_min_pre = cfg->jb_max_pre = cfg->jb_max = -1; 162 } 163 57 164 58 165 /***************************************************************************** … … 149 256 /* Only want to handle OPTIONS requests */ 150 257 if (pjsip_method_cmp(&rdata->msg_info.msg->line.req.method, 151 &pjsip_options_method) != 0)258 pjsip_get_options_method()) != 0) 152 259 { 153 260 return PJ_FALSE;
Note: See TracChangeset
for help on using the changeset viewer.