src/protocols/oscar/ssi.c

changeset 10993
8c992e277e86
parent 10991
ad4c153f004f
child 11005
06c22b605323
--- a/src/protocols/oscar/ssi.c	Thu Jun 09 04:42:27 2005 +0000
+++ b/src/protocols/oscar/ssi.c	Thu Jun 09 04:47:18 2005 +0000
@@ -396,7 +396,7 @@
 		aim_tlv_t *tlv = aim_tlv_gettlv(cur->data, 0x0131, 1);
 		if (tlv && tlv->length) {
 			char *alias = (char *)malloc((tlv->length+1)*sizeof(char));
-			strncpy(alias, tlv->value, tlv->length);
+			strncpy(alias, (char *)tlv->value, tlv->length);
 			alias[tlv->length] = 0;
 			return alias;
 		}
@@ -421,7 +421,7 @@
 		aim_tlv_t *tlv = aim_tlv_gettlv(cur->data, 0x013c, 1);
 		if (tlv && tlv->length) {
 			char *alias = (char *)malloc((tlv->length+1)*sizeof(char));
-			strncpy(alias, tlv->value, tlv->length);
+			strncpy(alias, (char *)tlv->value, tlv->length);
 			alias[tlv->length] = 0;
 			return alias;
 		}
@@ -922,7 +922,7 @@
 
 	/* Either add or remove the 0x0131 TLV from the TLV chain */
 	if ((alias != NULL) && (strlen(alias) > 0))
-		aim_tlvlist_replace_raw(&tmp->data, 0x0131, strlen(alias), alias);
+		aim_tlvlist_replace_str(&tmp->data, 0x0131, alias);
 	else
 		aim_tlvlist_remove(&tmp->data, 0x0131);
 
@@ -954,7 +954,7 @@
 
 	/* Either add or remove the 0x0131 TLV from the TLV chain */
 	if ((comment != NULL) && (strlen(comment) > 0))
-		aim_tlvlist_replace_raw(&tmp->data, 0x013c, strlen(comment), comment);
+		aim_tlvlist_replace_str(&tmp->data, 0x013c, comment);
 	else
 		aim_tlvlist_remove(&tmp->data, 0x013c);
 

mercurial