Commit 1127f97f authored by Simon Morlat's avatar Simon Morlat

fix test

parent 352b9c84
......@@ -445,11 +445,8 @@ void bc_tester_uninit(void) {
}
static void bc_tester_set_dir_prefix(char **prefix, const char *name) {
size_t len = strlen(name);
if (*prefix != NULL) free(*prefix);
*prefix = malloc(len + 1);
strncpy(*prefix, name, len);
(*prefix)[len] = '\0';
*prefix = strdup(name);
}
const char * bc_tester_get_resource_dir_prefix(void) {
......@@ -474,7 +471,6 @@ static char * bc_tester_path(const char *prefix, const char *name) {
size_t len = strlen(prefix) + 1 + strlen(name) + 1;
file = malloc(len);
snprintf(file, len, "%s/%s", prefix, name);
file[strlen(file)] = '\0';
}
return file;
}
......
......@@ -196,7 +196,7 @@ int main (int argc, char *argv[])
liblinphone_tester_init(NULL);
if (strstr(argv[0], ".libs")) {
if (strstr(argv[0], ".libs") && argv[0][0] == '/') {
char res_dir[128] = {0};
// this allows to launch liblinphone_tester from outside of tester directory
strncpy(res_dir, argv[0], strstr(argv[0], ".libs")-argv[0]);
......
......@@ -1431,7 +1431,7 @@ static void is_composing_notification(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc");
chat_room = linphone_core_get_chat_room(pauline->lc, marie->identity);
linphone_core_get_chat_room(marie->lc, pauline->identity); /*make marie create the chatroom with pauline, which is necessary for receiving the is-composing*/
{
int dummy=0;
wait_for_until(marie->lc,pauline->lc,&dummy,1,100); /*just to have time to purge message stored in the server*/
......
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