Просмотр исходного кода

applied Bogdan's patch, closes SER-120

Vaclav Kubart 19 лет назад
Родитель
Сommit
e63e60eec7
4 измененных файлов с 9 добавлено и 9 удалено
  1. 1 1
      lib/cds/sstr.c
  2. 2 2
      lib/presence/pres_doc.c
  3. 1 1
      lib/presence/pres_doc.h
  4. 5 5
      lib/xcap/xcap_client.c

+ 1 - 1
lib/cds/sstr.c

@@ -89,7 +89,7 @@ int str_dup_dbg(str_t* dst, const str_t* src, const char *file, int line)
 	if ( (!src->s) || (src->len < 1)) return 0;
 
 		/* ERROR_LOG("can't allocate memory (%d bytes)\n", src->len); */
-	INFO("str_dup called from %s:%d\n", file, line);
+	DEBUG_LOG("str_dup called from %s:%d\n", file, line);
 	dst->s = cds_malloc(src->len);
 	if (!dst->s) {
 		/* ERROR_LOG("can't allocate memory (%d bytes)\n", src->len); */

+ 2 - 2
lib/presence/pres_doc.c

@@ -47,7 +47,7 @@ str_t* tuple_status2str(basic_tuple_status_t status)
 	return &unknown;
 }
 
-basic_tuple_status_t str2tuple_status(const str *s)
+basic_tuple_status_t str2tuple_status(const str_t *s)
 {
 	if (str_nocase_equals(s, &open) == 0) return presence_tuple_open;
 	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,
 	while (n) {
 		nn = create_presence_note(&n->value, &n->lang);
 		if (!nn) {
-			ERR("can't create presence note\n");
+			ERROR_LOG("can't create presence note\n");
 			return -1;
 		}
 		DOUBLE_LINKED_LIST_ADD(dst_info->first_note, dst_info->last_note, nn);

+ 1 - 1
lib/presence/pres_doc.h

@@ -116,7 +116,7 @@ void free_extension_element(extension_element_t *p);
  * the return value is never NULL */
 str_t* tuple_status2str(basic_tuple_status_t status);
 
-basic_tuple_status_t str2tuple_status(const str *s);
+basic_tuple_status_t str2tuple_status(const str_t *s);
 
 /* duplicates presentity info */
 presentity_info_t *dup_presentity_info(presentity_info_t *p);

+ 5 - 5
lib/xcap/xcap_client.c

@@ -221,15 +221,15 @@ int xcap_query(const char *uri, xcap_query_params_t *params, char **buf, int *bs
 
 	i = 0;
 	if (params) {
-		if (params->auth_user) i += params->auth_user->len;
-		if (params->auth_pass) i += params->auth_pass->len;
+		if (params->auth_user.s) i += params->auth_user.len;
+		if (params->auth_pass.s) i += params->auth_pass.len;
 	}
 	if (i > 0) {
 		/* do authentication */
 		auth = (char *)cds_malloc(i + 2);
 		if (!auth) return -1;
-		sprintf(auth, "%s:%s", params->auth_user ? params->auth_user: "",
-				params->auth_pass ? params->auth_pass: "");
+		sprintf(auth, "%s:%s", params->auth_user.s ? params->auth_user.s: "",
+				params->auth_pass.s ? params->auth_pass.s: "");
 	}
 
 	auth_methods = CURLAUTH_BASIC | CURLAUTH_DIGEST;
@@ -332,7 +332,7 @@ int get_inline_xcap_buf_len(xcap_query_params_t *params)
 	/* counts the length for data buffer storing values of
 	 * xcap parameter members */
 	if (!params) {
-		ERR("BUG: empty params given\n");
+		ERROR_LOG("BUG: empty params given\n");
 		return 0;
 	}