Commit 07849de2 authored by johan's avatar johan

Fix zrtp b256 patch for C89 compliance

parent 90ba818c
......@@ -1601,11 +1601,13 @@ static char * seperate_string_list(char **str) {
MsZrtpCryptoTypesCount linphone_core_get_zrtp_key_agreement_suites(LinphoneCore *lc, MSZrtpKeyAgreement keyAgreements[MS_MAX_ZRTP_CRYPTO_TYPES]){
char * zrtpConfig = (char*)lp_config_get_string(lc->config, "sip", "zrtp_key_agreements_suites", NULL);
if (zrtpConfig == NULL)
MsZrtpCryptoTypesCount key_agreements_count = 0;
char * entry, * origPtr;
if (zrtpConfig == NULL) {
return 0;
}
MsZrtpCryptoTypesCount key_agreements_count = 0;
char * entry, * origPtr = strdup(zrtpConfig);
origPtr = strdup(zrtpConfig);
zrtpConfig = origPtr;
while ((entry = seperate_string_list(&zrtpConfig))) {
const MSZrtpKeyAgreement agreement = ms_zrtp_key_agreement_from_string(entry);
......@@ -1621,11 +1623,13 @@ MsZrtpCryptoTypesCount linphone_core_get_zrtp_key_agreement_suites(LinphoneCore
MsZrtpCryptoTypesCount linphone_core_get_zrtp_cipher_suites(LinphoneCore *lc, MSZrtpCipher ciphers[MS_MAX_ZRTP_CRYPTO_TYPES]){
char * zrtpConfig = (char*)lp_config_get_string(lc->config, "sip", "zrtp_cipher_suites", NULL);
if (zrtpConfig == NULL)
MsZrtpCryptoTypesCount cipher_count = 0;
char * entry, * origPtr;
if (zrtpConfig == NULL) {
return 0;
}
MsZrtpCryptoTypesCount cipher_count = 0;
char * entry, * origPtr = strdup(zrtpConfig);
origPtr = strdup(zrtpConfig);
zrtpConfig = origPtr;
while ((entry = seperate_string_list(&zrtpConfig))) {
const MSZrtpCipher cipher = ms_zrtp_cipher_from_string(entry);
......@@ -1641,11 +1645,13 @@ MsZrtpCryptoTypesCount linphone_core_get_zrtp_cipher_suites(LinphoneCore *lc, MS
MsZrtpCryptoTypesCount linphone_core_get_zrtp_hash_suites(LinphoneCore *lc, MSZrtpHash hashes[MS_MAX_ZRTP_CRYPTO_TYPES]){
char * zrtpConfig = (char*)lp_config_get_string(lc->config, "sip", "zrtp_hash_suites", NULL);
if (zrtpConfig == NULL)
MsZrtpCryptoTypesCount hash_count = 0;
char * entry, * origPtr;
if (zrtpConfig == NULL) {
return 0;
}
MsZrtpCryptoTypesCount hash_count = 0;
char * entry, * origPtr = strdup(zrtpConfig);
origPtr = strdup(zrtpConfig);
zrtpConfig = origPtr;
while ((entry = seperate_string_list(&zrtpConfig))) {
const MSZrtpHash hash = ms_zrtp_hash_from_string(entry);
......@@ -1661,11 +1667,13 @@ MsZrtpCryptoTypesCount linphone_core_get_zrtp_hash_suites(LinphoneCore *lc, MSZr
MsZrtpCryptoTypesCount linphone_core_get_zrtp_auth_suites(LinphoneCore *lc, MSZrtpAuthTag authTags[MS_MAX_ZRTP_CRYPTO_TYPES]){
char * zrtpConfig = (char*)lp_config_get_string(lc->config, "sip", "zrtp_auth_suites", NULL);
if (zrtpConfig == NULL)
MsZrtpCryptoTypesCount auth_tag_count = 0;
char * entry, * origPtr;
if (zrtpConfig == NULL) {
return 0;
}
MsZrtpCryptoTypesCount auth_tag_count = 0;
char * entry, * origPtr = strdup(zrtpConfig);
origPtr = strdup(zrtpConfig);
zrtpConfig = origPtr;
while ((entry = seperate_string_list(&zrtpConfig))) {
const MSZrtpAuthTag authTag = ms_zrtp_auth_tag_from_string(entry);
......@@ -1681,11 +1689,13 @@ MsZrtpCryptoTypesCount linphone_core_get_zrtp_auth_suites(LinphoneCore *lc, MSZr
MsZrtpCryptoTypesCount linphone_core_get_zrtp_sas_suites(LinphoneCore *lc, MSZrtpSasType sasTypes[MS_MAX_ZRTP_CRYPTO_TYPES]){
char * zrtpConfig = (char*)lp_config_get_string(lc->config, "sip", "zrtp_sas_suites", NULL);
if (zrtpConfig == NULL)
MsZrtpCryptoTypesCount sas_count = 0;
char * entry, * origPtr;
if (zrtpConfig == NULL) {
return 0;
}
MsZrtpCryptoTypesCount sas_count = 0;
char * entry, * origPtr = strdup(zrtpConfig);
origPtr = strdup(zrtpConfig);
zrtpConfig = origPtr;
while ((entry = seperate_string_list(&zrtpConfig))) {
const MSZrtpSasType type = ms_zrtp_sas_type_from_string(entry);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment