diff --git a/coreapi/lime.c b/coreapi/lime.c index 79ec908ad..9f23736ed 100644 --- a/coreapi/lime.c +++ b/coreapi/lime.c @@ -497,7 +497,7 @@ int lime_createMultipartMessage(void *cachedb, const char *contentType, uint8_t rootNode = xmlNewDocNode(xmlOutputMessage, NULL, (const xmlChar *)"doc", NULL); xmlDocSetRootElement(xmlOutputMessage, rootNode); /* add the self ZID child, convert it to an hexa string */ - bctbx_int8ToStr(selfZidHex, selfZid, 12); + bctbx_int8_to_str(selfZidHex, selfZid, 12); selfZidHex[24] = '\0'; /* add a NULL termination for libxml */ xmlNewTextChild(rootNode, NULL, (const xmlChar *)"ZID", selfZidHex); @@ -525,9 +525,9 @@ int lime_createMultipartMessage(void *cachedb, const char *contentType, uint8_t * ciphertext * */ msgNode = xmlNewDocNode(xmlOutputMessage, NULL, (const xmlChar *)"msg", NULL); - bctbx_int8ToStr(peerZidHex, currentKey->peerZID, 12); + bctbx_int8_to_str(peerZidHex, currentKey->peerZID, 12); peerZidHex[24] = '\0'; - bctbx_uint32ToStr(sessionIndexHex, currentKey->sessionIndex); + bctbx_uint32_to_str(sessionIndexHex, currentKey->sessionIndex); xmlNewTextChild(msgNode, NULL, (const xmlChar *)"pzid", peerZidHex); xmlNewTextChild(msgNode, NULL, (const xmlChar *)"index", sessionIndexHex); @@ -597,7 +597,7 @@ int lime_decryptMultipartMessage(void *cachedb, uint8_t *message, const char *se if (bzrtp_getSelfZID(cachedb, selfURI, selfZid, NULL) != 0) { return LIME_UNABLE_TO_DECRYPT_MESSAGE; } - bctbx_int8ToStr(selfZidHex, selfZid, 12); + bctbx_int8_to_str(selfZidHex, selfZid, 12); selfZidHex[24]='\0'; xml_ctx = linphone_xmlparsing_context_new(); @@ -617,7 +617,7 @@ int lime_decryptMultipartMessage(void *cachedb, uint8_t *message, const char *se peerZidHex = linphone_get_xml_text_content(xml_ctx, "/doc/ZID"); if (peerZidHex != NULL) { /* Convert it from hexa string to bytes string and set the result in the associatedKey structure */ - bctbx_strToUint8(associatedKey.peerZID, (const uint8_t *)peerZidHex, (uint16_t)strlen(peerZidHex)); + bctbx_str_to_uint8(associatedKey.peerZID, (const uint8_t *)peerZidHex, (uint16_t)strlen(peerZidHex)); linphone_free_xml_text_content(peerZidHex); /* Get the matching key from cache */ @@ -641,7 +641,7 @@ int lime_decryptMultipartMessage(void *cachedb, uint8_t *message, const char *se snprintf(xpath_str, sizeof(xpath_str), "/doc/msg[%i]/index", i); sessionIndexHex = linphone_get_xml_text_content(xml_ctx, xpath_str); if (sessionIndexHex != NULL) { - usedSessionIndex = bctbx_strToUint32((const unsigned char *)sessionIndexHex); + usedSessionIndex = bctbx_str_to_uint32((const unsigned char *)sessionIndexHex); linphone_free_xml_text_content(sessionIndexHex); } snprintf(xpath_str, sizeof(xpath_str), "/doc/msg[%i]/text", i); diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index e08ef3413..8ec7b2dd3 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -6286,7 +6286,7 @@ static void linphone_core_zrtp_cache_migration(LinphoneCore *lc) { while (cur!=NULL) { if ((!xmlStrcmp(cur->name, (const xmlChar *)"selfZID"))){ /* self ZID found, extract it */ selfZidHex = xmlNodeListGetString(cacheXml, cur->xmlChildrenNode, 1); - bctbx_strToUint8(selfZID, selfZidHex, 24); + bctbx_str_to_uint8(selfZID, selfZidHex, 24); break; } cur = cur->next; @@ -6352,7 +6352,7 @@ static void linphone_core_zrtp_cache_migration(LinphoneCore *lc) { if (!xmlStrcmp(peerNodeChildren->name, (const xmlChar *)"ZID")) { peerZIDString = xmlNodeListGetString(cacheXml, peerNodeChildren->xmlChildrenNode, 1); - bctbx_strToUint8(peerZID, peerZIDString, 24); + bctbx_str_to_uint8(peerZID, peerZIDString, 24); peerZIDFound=1; } @@ -6361,7 +6361,7 @@ static void linphone_core_zrtp_cache_migration(LinphoneCore *lc) { if (!xmlStrcmp(peerNodeChildren->name, (const xmlChar *)zrtpColNames[i])) { nodeContent = xmlNodeListGetString(cacheXml, peerNodeChildren->xmlChildrenNode, 1); zrtpColValues[i] = (uint8_t *)bctbx_malloc(zrtpColExpectedLengths[i]); - bctbx_strToUint8(zrtpColValues[i], nodeContent, 2*zrtpColExpectedLengths[i]); + bctbx_str_to_uint8(zrtpColValues[i], nodeContent, 2*zrtpColExpectedLengths[i]); zrtpColLengths[i]=zrtpColExpectedLengths[i]; } } @@ -6370,7 +6370,7 @@ static void linphone_core_zrtp_cache_migration(LinphoneCore *lc) { if (!xmlStrcmp(peerNodeChildren->name, (const xmlChar *)limeColNames[i])) { nodeContent = xmlNodeListGetString(cacheXml, peerNodeChildren->xmlChildrenNode, 1); limeColValues[i] = (uint8_t *)bctbx_malloc(limeColExpectedLengths[i]); - bctbx_strToUint8(limeColValues[i], nodeContent, 2*limeColExpectedLengths[i]); + bctbx_str_to_uint8(limeColValues[i], nodeContent, 2*limeColExpectedLengths[i]); limeColLengths[i]=limeColExpectedLengths[i]; } }