dahdi_dynamic: Create a span type for dynamic spans.
Fixes the following warning when loading the driver: dahdi: Warning: Span DYN/eth/eth1/00:50:c2:97:92:1d/1 didn't specify a spantype. Please fix driver! The spantype is intended to be used by the auto configuration tools (dahdi_genconf, pinned spans, etc..) but dynamic spans, since they are created directly by dahdi_cfg, never take part in the pre-registration auto configuration, therefore the span type was never used. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
This commit is contained in:
parent
4a75f58156
commit
3a0905b1ec
@ -732,6 +732,8 @@ enum spantypes dahdi_str2spantype(const char *name)
|
||||
return SPANTYPE_DIGITAL_BRI_TE;
|
||||
else if (strcasecmp("BRI_SOFT", name) == 0)
|
||||
return SPANTYPE_DIGITAL_BRI_SOFT;
|
||||
else if (strcasecmp("DYNAMIC", name) == 0)
|
||||
return SPANTYPE_DIGITAL_DYNAMIC;
|
||||
else
|
||||
return SPANTYPE_INVALID;
|
||||
}
|
||||
@ -749,6 +751,7 @@ const char *dahdi_spantype2str(enum spantypes st)
|
||||
case SPANTYPE_DIGITAL_BRI_NT: return "BRI_NT";
|
||||
case SPANTYPE_DIGITAL_BRI_TE: return "BRI_TE";
|
||||
case SPANTYPE_DIGITAL_BRI_SOFT: return "BRI_SOFT";
|
||||
case SPANTYPE_DIGITAL_DYNAMIC: return "DYNAMIC";
|
||||
default:
|
||||
case SPANTYPE_INVALID: return "INVALID";
|
||||
};
|
||||
|
@ -630,6 +630,10 @@ static int _create_dynamic(struct dahdi_dynamic_span *dds)
|
||||
d->span.deflaw = DAHDI_LAW_MULAW;
|
||||
d->span.flags |= DAHDI_FLAG_RBS;
|
||||
d->span.chans = d->chans;
|
||||
d->span.spantype = SPANTYPE_DIGITAL_DYNAMIC;
|
||||
d->span.linecompat = DAHDI_CONFIG_D4 | DAHDI_CONFIG_ESF |
|
||||
DAHDI_CONFIG_AMI | DAHDI_CONFIG_B8ZS | DAHDI_CONFIG_CCS |
|
||||
DAHDI_CONFIG_HDB3 | DAHDI_CONFIG_CRC4 | DAHDI_CONFIG_NOTOPEN;
|
||||
d->span.ops = &dynamic_ops;
|
||||
for (x = 0; x < d->span.channels; x++) {
|
||||
sprintf(d->chans[x]->name, "DYN/%s/%s/%d",
|
||||
|
@ -811,6 +811,7 @@ enum spantypes {
|
||||
SPANTYPE_DIGITAL_BRI_NT,
|
||||
SPANTYPE_DIGITAL_BRI_TE,
|
||||
SPANTYPE_DIGITAL_BRI_SOFT,
|
||||
SPANTYPE_DIGITAL_DYNAMIC,
|
||||
};
|
||||
const char *dahdi_spantype2str(enum spantypes st);
|
||||
enum spantypes dahdi_str2spantype(const char *name);
|
||||
|
Loading…
Reference in New Issue
Block a user