diff options
author | Cidorvan Leite <cidorvan.leite@openbossa.org> | 2008-04-11 21:58:36 +0000 |
---|---|---|
committer | Cidorvan Leite <cidorvan.leite@openbossa.org> | 2008-04-11 21:58:36 +0000 |
commit | 31cd43a596c4bbf153d15e0c78bc2f9e5f2c7050 (patch) | |
tree | 1c2d1f23cb4768ddf292166fca37a03e446e3dd5 /hcid | |
parent | 23c863bbdcf3ad050a8e1542030c85d668d10405 (diff) |
Check if agent is already created
Diffstat (limited to 'hcid')
-rw-r--r-- | hcid/agent.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hcid/agent.c b/hcid/agent.c index f560f8d8..772a56ee 100644 --- a/hcid/agent.c +++ b/hcid/agent.c @@ -200,6 +200,9 @@ struct agent *agent_create(struct adapter *adapter, const char *name, { struct agent *agent; + if (adapter->agent && g_str_equal(adapter->agent->name, name)) + return NULL; + agent = g_new0(struct agent, 1); agent->adapter = adapter; |