diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-05-04 12:53:15 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-05-04 13:05:36 +0200 |
commit | 885a11b33e79ee55e323eaf4bda975284a54d50d (patch) | |
tree | 7b9c31685848467721b197c49c16bdc7e27cc179 | |
parent | 99f2477653c1a1bff85cf0d5f823c4845fb46dc3 (diff) |
Revert "subscr_paging_dispatch(): use conn->subscr instead of separate param"
This reverts commit 6f4e83beb05b7e4fd615504a7bf6a71afe15064d, but note:
this is not a 1:1 revert since the subscr_paging_sec_cb() semantics have changed.
In subscr_paging_dispatch(), the separate subscr parameter is needed in cases
where paging expired and there is no conn available.
For subscr_paging_sec_cb(), a conn must always be available. Hence it avoids
any duplicity by only passing the conn and deriving the subscr from that.
Callers of subscr_paging_sec_cb() pass NULL as param, so pass conn->subscr when
calling subscr_paging_dispatch() from subscr_paging_sec_cb().
-rw-r--r-- | openbsc/src/libmsc/gsm_subscriber.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/openbsc/src/libmsc/gsm_subscriber.c b/openbsc/src/libmsc/gsm_subscriber.c index 96da9e75b..f62b9df6e 100644 --- a/openbsc/src/libmsc/gsm_subscriber.c +++ b/openbsc/src/libmsc/gsm_subscriber.c @@ -63,7 +63,7 @@ static int subscr_paging_dispatch(unsigned int hooknum, unsigned int event, { struct subscr_request *request, *tmp; struct gsm_subscriber_connection *conn = data; - struct gsm_subscriber *subscr = conn->subscr; + struct gsm_subscriber *subscr = param; struct paging_signal_data sig_data; LOGP(DPAG, LOGL_DEBUG, "Running paging response action for %s\n", @@ -119,14 +119,14 @@ static int subscr_paging_sec_cb(unsigned int hooknum, unsigned int event, subscr_name(conn->subscr)); rc = subscr_paging_dispatch( GSM_HOOK_RR_PAGING, GSM_PAGING_EXPIRED, - msg, data, NULL); + msg, conn, conn->subscr); break; case GSM_SECURITY_NOAVAIL: case GSM_SECURITY_SUCCEEDED: rc = subscr_paging_dispatch( GSM_HOOK_RR_PAGING, GSM_PAGING_SUCCEEDED, - msg, data, NULL); + msg, conn, conn->subscr); break; default: |