1
1

changed to return a single opaque string containing contact info for all available oob channels

This commit was SVN r2024.
Этот коммит содержится в:
Tim Woodall 2004-08-10 22:30:21 +00:00
родитель 5a8f0d4ec5
Коммит 2da45b6a07
2 изменённых файлов: 9 добавлений и 14 удалений

Просмотреть файл

@ -75,16 +75,15 @@ extern "C" {
#endif #endif
/** /**
* Obtains the contact info (oob implementation specific) URI strings through * Returns a null terminated character string returning contact info
* which this process can be contacted on an OOB channel. * for all supported OOB channels.
* *
* @return A null terminated array of strings. * @return A null terminated string.
* *
* The caller is responsible for freeing both the array and the strings that * The caller is responsible for freeing the returned string.
* it points to.
*/ */
char** mca_oob_get_contact_info(void); char* mca_oob_get_contact_info(void);
/** /**
* Similiar to unix writev(2). * Similiar to unix writev(2).

Просмотреть файл

@ -107,16 +107,12 @@ int mca_oob_base_init(bool *user_threads, bool *hidden_threads)
* Obtains the contact info (oob implementation specific) URI strings through * Obtains the contact info (oob implementation specific) URI strings through
* which this process can be contacted on an OOB channel. * which this process can be contacted on an OOB channel.
* *
* @return A null terminated array of strings. * @return A null terminated string.
* *
* The caller is responsible for freeing both the array and the strings that * The caller is responsible for freeing the returned string.
* it points to.
*/ */
char** mca_oob_get_contact_info() char* mca_oob_get_contact_info()
{ {
char** contact_info = malloc(sizeof(char*) * (ompi_list_get_size(&mca_oob_base_modules)+1)); return strdup("tcp:localhost:5000");
contact_info[0] = strdup("tcp:localhost:5000");
contact_info[1] = NULL;
return contact_info;
} }