xpp: empty labels are not duplicate

Some older Asttribanks had an empty label string. They should be ignored
when testing for a duplicate label at device probe time.

While we're at it, reduce panic level in the notice.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9925 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
Tzafrir Cohen 2011-05-31 13:11:56 +00:00
parent 155cb5a0b1
commit 6d9baa3f99

View File

@ -95,7 +95,7 @@ int xbus_check_unique(xbus_t *xbus)
{
if (!xbus)
return -ENOENT;
if (xbus->label) {
if (xbus->label && *(xbus->label)) {
xbus_t *xbus_old;
XBUS_DBG(DEVICES, xbus, "Checking LABEL='%s'\n", xbus->label);
@ -109,7 +109,7 @@ int xbus_check_unique(xbus_t *xbus)
return -EBUSY;
}
} else {
XBUS_NOTICE(xbus, "MISSING BOARD LABEL!!!\n");
XBUS_NOTICE(xbus, "Missing board label (old Astribank?)\n");
}
return 0;
}