From: SourceForge.net <no...@so...> - 2009-10-15 01:26:09
|
Bugs item #2780893, was opened at 2009-04-24 17:47 Message generated for change (Settings changed) made by ricwhite You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=532251&aid=2780893&group_id=71730 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: OpenHPI Daemon Client >Group: 2.15.0 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Ric White (ricwhite) Assigned to: Ric White (ricwhite) Summary: Routine oh_client_init() unlocks ohd_sessions_sem twice Initial Comment: In routine oh_client_init() in file openhpid/oh_client_session.cpp, the mutex ohd_sessions_sem can be unlocked twice. In the 2.14.0 revision of the code, there is an unneeded call to g_static_rec_mutex_unlock() at line 105: g_static_rec_mutex_lock(&ohd_sessions_sem); ... if (!ohd_domains) { // Create domain table ... if (!domain_conf) { const char *host, *portstr; int port; /* TODO: change these envs to have DEFAULT in the name*/ host = getenv("OPENHPI_DAEMON_HOST"); if (!host) host = "localhost"; portstr = getenv("OPENHPI_DAEMON_PORT"); if (!portstr) port = OPENHPI_DEFAULT_DAEMON_PORT; else port = atoi(portstr); domain_conf = g_new0(struct oh_domain_conf, 1); domain_conf->did = default_did; strncpy(domain_conf->host, host, SAHPI_MAX_TEXT_BUFFER_LENGTH); domain_conf->port = port; g_hash_table_insert(ohd_domains, &domain_conf->did, domain_conf); } g_static_rec_mutex_unlock(&ohd_sessions_sem); // **** <- This one should be removed. **** } g_static_rec_mutex_unlock(&ohd_sessions_sem); return 0; ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=532251&aid=2780893&group_id=71730 |