Browse code

applied Bogdan's patch, closes SER-120

Vaclav Kubart authored on 22/11/2006 12:52:05
Showing 4 changed files
... ...
@@ -89,7 +89,7 @@ int str_dup_dbg(str_t* dst, const str_t* src, const char *file, int line)
89 89
 	if ( (!src->s) || (src->len < 1)) return 0;
90 90
 
91 91
 		/* ERROR_LOG("can't allocate memory (%d bytes)\n", src->len); */
92
-	INFO("str_dup called from %s:%d\n", file, line);
92
+	DEBUG_LOG("str_dup called from %s:%d\n", file, line);
93 93
 	dst->s = cds_malloc(src->len);
94 94
 	if (!dst->s) {
95 95
 		/* ERROR_LOG("can't allocate memory (%d bytes)\n", src->len); */
... ...
@@ -47,7 +47,7 @@ str_t* tuple_status2str(basic_tuple_status_t status)
47 47
 	return &unknown;
48 48
 }
49 49
 
50
-basic_tuple_status_t str2tuple_status(const str *s)
50
+basic_tuple_status_t str2tuple_status(const str_t *s)
51 51
 {
52 52
 	if (str_nocase_equals(s, &open) == 0) return presence_tuple_open;
53 53
 	if (str_nocase_equals(s, &closed) == 0) return presence_tuple_closed;
... ...
@@ -306,7 +306,7 @@ static int copy_tuple_notes(presence_tuple_info_t *dst_info,
306 306
 	while (n) {
307 307
 		nn = create_presence_note(&n->value, &n->lang);
308 308
 		if (!nn) {
309
-			ERR("can't create presence note\n");
309
+			ERROR_LOG("can't create presence note\n");
310 310
 			return -1;
311 311
 		}
312 312
 		DOUBLE_LINKED_LIST_ADD(dst_info->first_note, dst_info->last_note, nn);
... ...
@@ -116,7 +116,7 @@ void free_extension_element(extension_element_t *p);
116 116
  * the return value is never NULL */
117 117
 str_t* tuple_status2str(basic_tuple_status_t status);
118 118
 
119
-basic_tuple_status_t str2tuple_status(const str *s);
119
+basic_tuple_status_t str2tuple_status(const str_t *s);
120 120
 
121 121
 /* duplicates presentity info */
122 122
 presentity_info_t *dup_presentity_info(presentity_info_t *p);
... ...
@@ -221,15 +221,15 @@ int xcap_query(const char *uri, xcap_query_params_t *params, char **buf, int *bs
221 221
 
222 222
 	i = 0;
223 223
 	if (params) {
224
-		if (params->auth_user) i += params->auth_user->len;
225
-		if (params->auth_pass) i += params->auth_pass->len;
224
+		if (params->auth_user.s) i += params->auth_user.len;
225
+		if (params->auth_pass.s) i += params->auth_pass.len;
226 226
 	}
227 227
 	if (i > 0) {
228 228
 		/* do authentication */
229 229
 		auth = (char *)cds_malloc(i + 2);
230 230
 		if (!auth) return -1;
231
-		sprintf(auth, "%s:%s", params->auth_user ? params->auth_user: "",
232
-				params->auth_pass ? params->auth_pass: "");
231
+		sprintf(auth, "%s:%s", params->auth_user.s ? params->auth_user.s: "",
232
+				params->auth_pass.s ? params->auth_pass.s: "");
233 233
 	}
234 234
 
235 235
 	auth_methods = CURLAUTH_BASIC | CURLAUTH_DIGEST;
... ...
@@ -332,7 +332,7 @@ int get_inline_xcap_buf_len(xcap_query_params_t *params)
332 332
 	/* counts the length for data buffer storing values of
333 333
 	 * xcap parameter members */
334 334
 	if (!params) {
335
-		ERR("BUG: empty params given\n");
335
+		ERROR_LOG("BUG: empty params given\n");
336 336
 		return 0;
337 337
 	}
338 338