[PATCH] mISDNuser: mISDNcapid: fix lPLCIDisconnectInd() by returning zero when B3 link is missing
Christoph Schulz <[email protected]> Sat, 11 Feb 2017 12:55:13 +0100
| Newsgroups | gmane.linux.isdn.i4l.user |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The function lPLCIDisconnectInd() is called by plci_cc_disconnect_ind() when a EV_L3_DISCONNECT_IND event is being handled. If the B3 link has already gone, lPLCIDisconnectInd() returns -ENODEV, which prevents plci_cc_disconnect_ind() from calling lPLCILinkDown() and therefore from cleaning up properly. This commit makes lPLCIDisconnectInd() returns zero (i.e. success) in such a situation. Signed-off-by: Christoph Schulz <[email protected]> - --- capi20/lplci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/capi20/lplci.c b/capi20/lplci.c index 61442d9..473a7c6 100644 - --- a/capi20/lplci.c +++ b/capi20/lplci.c @@ -235,7 +235,7 @@ static void lPLCIClearOtherApps(struct lPLCI *lp) static int lPLCIDisconnectInd(struct lPLCI *lp, struct mc_buf *mc) { struct BInstance *bi = lp->BIlink; - - int ret = -ENODEV; + int ret = 0; if (mc && bi) { lPLCICmsgHeader(lp, &mc->cmsg, CAPI_DISCONNECT, CAPI_IND); - -- 2.10.2 -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAlie+6EACgkQL11jCnyQ5Oy2UwCfRlIwNeIo+5lf//1Kf6kqklr/ t7wAniK2J5DS+SULb5V1hg6KI4BkGnSJ =LTjD -----END PGP SIGNATURE-----