blob: 6abb0d8320b54b311a6ab8f0072d26fadb6f1eae [file] [log] [blame]
Holger Hans Peter Freyther857e5e62009-06-12 07:08:13 +02001/* The concept of a subscriber for the MSC, roughly HLR/VLR functionality */
Harald Welte52b1f982008-12-23 20:25:15 +00002
3/* (C) 2008 by Harald Welte <laforge@gnumonks.org>
Holger Hans Peter Freythere7bd8632013-06-30 15:30:47 +02004 * (C) 2009,2013 by Holger Hans Peter Freyther <zecke@selfish.org>
Harald Welte8470bf22008-12-25 23:28:35 +00005 *
Harald Welte52b1f982008-12-23 20:25:15 +00006 * All Rights Reserved
7 *
8 * This program is free software; you can redistribute it and/or modify
Harald Welte9af6ddf2011-01-01 15:25:50 +01009 * it under the terms of the GNU Affero General Public License as published by
10 * the Free Software Foundation; either version 3 of the License, or
Harald Welte52b1f982008-12-23 20:25:15 +000011 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Harald Welte9af6ddf2011-01-01 15:25:50 +010016 * GNU Affero General Public License for more details.
Harald Welte52b1f982008-12-23 20:25:15 +000017 *
Harald Welte9af6ddf2011-01-01 15:25:50 +010018 * You should have received a copy of the GNU Affero General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
Harald Welte52b1f982008-12-23 20:25:15 +000020 *
21 */
22
Harald Welte75a983f2008-12-27 21:34:06 +000023#include <unistd.h>
24#include <stdlib.h>
25#include <stdio.h>
26#include <string.h>
Holger Freyther85a7b362009-04-18 13:48:55 +020027#include <assert.h>
Jan Luebbebfbdeec2012-12-27 00:27:16 +010028#include <time.h>
Harald Welte52b1f982008-12-23 20:25:15 +000029
Pablo Neira Ayuso136f4532011-03-22 16:47:59 +010030#include <osmocom/core/talloc.h>
Sylvain Munaut1e245502010-12-01 21:07:29 +010031
Holger Hans Peter Freyther763b42a2010-12-29 11:07:22 +010032#include <osmocom/vty/vty.h>
33
Harald Welte8470bf22008-12-25 23:28:35 +000034#include <openbsc/gsm_subscriber.h>
Sylvain Munaut5a86e062010-12-01 22:38:03 +010035#include <openbsc/gsm_04_08.h>
Holger Freyther3e0ef7c2009-06-02 02:54:48 +000036#include <openbsc/debug.h>
Sylvain Munaut1e245502010-12-01 21:07:29 +010037#include <openbsc/paging.h>
Harald Welteea5cf302009-07-29 23:14:15 +020038#include <openbsc/signal.h>
Harald Welte75a983f2008-12-27 21:34:06 +000039#include <openbsc/db.h>
Holger Hans Peter Freythere7bd8632013-06-30 15:30:47 +020040#include <openbsc/chan_alloc.h>
Harald Welte52b1f982008-12-23 20:25:15 +000041
Sylvain Munaut1e245502010-12-01 21:07:29 +010042void *tall_sub_req_ctx;
43
Jan Luebbe6e300682012-12-25 18:58:34 +010044extern struct llist_head *subscr_bsc_active_subscribers(void);
Harald Welte75a983f2008-12-27 21:34:06 +000045
Sylvain Munaut5a86e062010-12-01 22:38:03 +010046int gsm48_secure_channel(struct gsm_subscriber_connection *conn, int key_seq,
47 gsm_cbfn *cb, void *cb_data);
48
Sylvain Munaut1e245502010-12-01 21:07:29 +010049
50/*
51 * Struct for pending channel requests. This is managed in the
52 * llist_head requests of each subscriber. The reference counting
53 * should work in such a way that a subscriber with a pending request
54 * remains in memory.
55 */
56struct subscr_request {
57 struct llist_head entry;
58
59 /* back reference */
60 struct gsm_subscriber *subscr;
61
62 /* the requested channel type */
63 int channel_type;
64
Holger Hans Peter Freyther68c3bf62010-12-29 09:33:34 +010065 /* what did we do */
66 int state;
67
Sylvain Munaut1e245502010-12-01 21:07:29 +010068 /* the callback data */
69 gsm_cbfn *cbfn;
70 void *param;
71};
72
Holger Hans Peter Freyther68c3bf62010-12-29 09:33:34 +010073enum {
74 REQ_STATE_INITIAL,
75 REQ_STATE_QUEUED,
76 REQ_STATE_PAGED,
77 REQ_STATE_FAILED_START,
78 REQ_STATE_DISPATCHED,
79};
80
Sylvain Munaut1e245502010-12-01 21:07:29 +010081/*
82 * We got the channel assigned and can now hand this channel
83 * over to one of our callbacks.
84 */
Sylvain Munaut5a86e062010-12-01 22:38:03 +010085static int subscr_paging_dispatch(unsigned int hooknum, unsigned int event,
86 struct msgb *msg, void *data, void *param)
Sylvain Munaut1e245502010-12-01 21:07:29 +010087{
88 struct subscr_request *request;
Sylvain Munaut8a31a3f2010-12-01 23:04:03 +010089 struct gsm_subscriber_connection *conn = data;
Sylvain Munaut5a86e062010-12-01 22:38:03 +010090 struct gsm_subscriber *subscr = param;
Sylvain Munaut8a31a3f2010-12-01 23:04:03 +010091 struct paging_signal_data sig_data;
Sylvain Munaut1e245502010-12-01 21:07:29 +010092
93 /* There is no request anymore... */
94 if (llist_empty(&subscr->requests))
95 return -1;
96
Sylvain Munaut8a31a3f2010-12-01 23:04:03 +010097 /* Dispatch signal */
98 sig_data.subscr = subscr;
99 sig_data.bts = conn ? conn->bts : NULL;
100 sig_data.conn = conn;
Holger Hans Peter Freytherd3baf412010-12-23 18:19:17 +0100101 sig_data.paging_result = event;
Pablo Neira Ayusobbc5b992011-05-06 12:12:31 +0200102 osmo_signal_dispatch(
Sylvain Munaut8a31a3f2010-12-01 23:04:03 +0100103 SS_PAGING,
104 event == GSM_PAGING_SUCCEEDED ?
105 S_PAGING_SUCCEEDED : S_PAGING_EXPIRED,
106 &sig_data
107 );
108
Sylvain Munaut1e245502010-12-01 21:07:29 +0100109 /*
110 * FIXME: What to do with paging requests coming during
111 * this callback? We must be sure to not start paging when
112 * we have an active connection to a subscriber and to make
113 * the subscr_put_channel work as required...
114 */
115 request = (struct subscr_request *)subscr->requests.next;
Holger Hans Peter Freyther68c3bf62010-12-29 09:33:34 +0100116 request->state = REQ_STATE_DISPATCHED;
Sylvain Munaut1e245502010-12-01 21:07:29 +0100117 llist_del(&request->entry);
118 subscr->in_callback = 1;
119 request->cbfn(hooknum, event, msg, data, request->param);
120 subscr->in_callback = 0;
121
Holger Hans Peter Freytherffccb772010-12-28 17:47:43 +0100122 if (event != GSM_PAGING_SUCCEEDED) {
123 /*
124 * This is a workaround for a bigger issue. We have
125 * issued paging that might involve multiple BTSes
126 * and one of them have failed now. We will stop the
127 * other paging requests as well as the next timeout
128 * would work on the next paging request and the queue
129 * will do bad things. This should be fixed by counting
130 * the outstanding results.
131 */
132 paging_request_stop(NULL, subscr, NULL, NULL);
Holger Hans Peter Freytherf72b3d52010-12-28 17:27:05 +0100133 subscr_put_channel(subscr);
Holger Hans Peter Freytherffccb772010-12-28 17:47:43 +0100134 }
Holger Hans Peter Freytherf72b3d52010-12-28 17:27:05 +0100135
Sylvain Munaut1e245502010-12-01 21:07:29 +0100136 subscr_put(subscr);
137 talloc_free(request);
138 return 0;
139}
140
Sylvain Munaut5a86e062010-12-01 22:38:03 +0100141static int subscr_paging_sec_cb(unsigned int hooknum, unsigned int event,
142 struct msgb *msg, void *data, void *param)
143{
144 int rc;
145
146 switch (event) {
147 case GSM_SECURITY_AUTH_FAILED:
148 /* Dispatch as paging failure */
149 rc = subscr_paging_dispatch(
150 GSM_HOOK_RR_PAGING, GSM_PAGING_EXPIRED,
151 msg, data, param);
152 break;
153
154 case GSM_SECURITY_NOAVAIL:
155 case GSM_SECURITY_SUCCEEDED:
156 /* Dispatch as paging failure */
157 rc = subscr_paging_dispatch(
158 GSM_HOOK_RR_PAGING, GSM_PAGING_SUCCEEDED,
159 msg, data, param);
160 break;
161
162 default:
163 rc = -EINVAL;
164 }
165
166 return rc;
167}
168
169static int subscr_paging_cb(unsigned int hooknum, unsigned int event,
170 struct msgb *msg, void *data, void *param)
171{
172 struct gsm_subscriber_connection *conn = data;
173 struct gsm48_hdr *gh;
174 struct gsm48_pag_resp *pr;
175
176 /* Other cases mean problem, dispatch direclty */
177 if (event != GSM_PAGING_SUCCEEDED)
178 return subscr_paging_dispatch(hooknum, event, msg, data, param);
179
180 /* Get paging response */
181 gh = msgb_l3(msg);
182 pr = (struct gsm48_pag_resp *)gh->data;
183
184 /* We _really_ have a channel, secure it now ! */
185 return gsm48_secure_channel(conn, pr->key_seq, subscr_paging_sec_cb, param);
186}
187
188
Sylvain Munaut1e245502010-12-01 21:07:29 +0100189static void subscr_send_paging_request(struct gsm_subscriber *subscr)
190{
191 struct subscr_request *request;
192 int rc;
193
194 assert(!llist_empty(&subscr->requests));
195
196 request = (struct subscr_request *)subscr->requests.next;
Holger Hans Peter Freyther68c3bf62010-12-29 09:33:34 +0100197 request->state = REQ_STATE_PAGED;
Sylvain Munaut1e245502010-12-01 21:07:29 +0100198 rc = paging_request(subscr->net, subscr, request->channel_type,
199 subscr_paging_cb, subscr);
200
201 /* paging failed, quit now */
202 if (rc <= 0) {
Holger Hans Peter Freyther68c3bf62010-12-29 09:33:34 +0100203 request->state = REQ_STATE_FAILED_START;
Holger Hans Peter Freytherd3baf412010-12-23 18:19:17 +0100204 subscr_paging_cb(GSM_HOOK_RR_PAGING, GSM_PAGING_BUSY,
Sylvain Munaut1e245502010-12-01 21:07:29 +0100205 NULL, NULL, subscr);
206 }
207}
208
209void subscr_get_channel(struct gsm_subscriber *subscr,
210 int type, gsm_cbfn *cbfn, void *param)
211{
212 struct subscr_request *request;
213
214 request = talloc(tall_sub_req_ctx, struct subscr_request);
215 if (!request) {
216 if (cbfn)
217 cbfn(GSM_HOOK_RR_PAGING, GSM_PAGING_OOM,
218 NULL, NULL, param);
219 return;
220 }
221
222 memset(request, 0, sizeof(*request));
223 request->subscr = subscr_get(subscr);
224 request->channel_type = type;
225 request->cbfn = cbfn;
226 request->param = param;
Holger Hans Peter Freyther68c3bf62010-12-29 09:33:34 +0100227 request->state = REQ_STATE_INITIAL;
Sylvain Munaut1e245502010-12-01 21:07:29 +0100228
229 /*
230 * FIXME: We might be able to assign more than one
231 * channel, e.g. voice and SMS submit at the same
232 * time.
233 */
234 if (!subscr->in_callback && llist_empty(&subscr->requests)) {
235 /* add to the list, send a request */
236 llist_add_tail(&request->entry, &subscr->requests);
237 subscr_send_paging_request(subscr);
238 } else {
239 /* this will be picked up later, from subscr_put_channel */
240 llist_add_tail(&request->entry, &subscr->requests);
Holger Hans Peter Freyther68c3bf62010-12-29 09:33:34 +0100241 request->state = REQ_STATE_QUEUED;
Sylvain Munaut1e245502010-12-01 21:07:29 +0100242 }
243}
244
Holger Hans Peter Freyther725966d2010-12-27 22:43:28 +0100245void subscr_put_channel(struct gsm_subscriber *subscr)
Sylvain Munaut1e245502010-12-01 21:07:29 +0100246{
247 /*
248 * FIXME: Continue with other requests now... by checking
249 * the gsm_subscriber inside the gsm_lchan. Drop the ref count
250 * of the lchan after having asked the next requestee to handle
251 * the channel.
252 */
253 /*
254 * FIXME: is the lchan is of a different type we could still
255 * issue an immediate assignment for another channel and then
256 * close this one.
257 */
258 /*
259 * Currently we will drop the last ref of the lchan which
260 * will result in a channel release on RSL and we will start
261 * the paging. This should work most of the time as the MS
262 * will listen to the paging requests before we timeout
263 */
264
Holger Hans Peter Freyther725966d2010-12-27 22:43:28 +0100265 if (subscr && !llist_empty(&subscr->requests))
266 subscr_send_paging_request(subscr);
Sylvain Munaut1e245502010-12-01 21:07:29 +0100267}
268
269
Harald Welte9176bd42009-07-23 18:46:00 +0200270struct gsm_subscriber *subscr_get_by_tmsi(struct gsm_network *net,
Holger Hans Peter Freytherc42ad8b2011-04-18 17:04:00 +0200271 uint32_t tmsi)
Harald Welte75a983f2008-12-27 21:34:06 +0000272{
Holger Hans Peter Freyther22230252009-08-19 12:53:57 +0200273 char tmsi_string[14];
Holger Freyther12aa50d2009-01-01 18:02:05 +0000274 struct gsm_subscriber *subscr;
Harald Welte75a983f2008-12-27 21:34:06 +0000275
Holger Freyther12aa50d2009-01-01 18:02:05 +0000276 /* we might have a record in memory already */
Jan Luebbe6e300682012-12-25 18:58:34 +0100277 llist_for_each_entry(subscr, subscr_bsc_active_subscribers(), entry) {
Holger Hans Peter Freyther22230252009-08-19 12:53:57 +0200278 if (tmsi == subscr->tmsi)
Holger Freyther12aa50d2009-01-01 18:02:05 +0000279 return subscr_get(subscr);
Harald Welte75a983f2008-12-27 21:34:06 +0000280 }
281
Holger Hans Peter Freyther22230252009-08-19 12:53:57 +0200282 sprintf(tmsi_string, "%u", tmsi);
283 return db_get_subscriber(net, GSM_SUBSCRIBER_TMSI, tmsi_string);
Harald Welte75a983f2008-12-27 21:34:06 +0000284}
285
Harald Welte9176bd42009-07-23 18:46:00 +0200286struct gsm_subscriber *subscr_get_by_imsi(struct gsm_network *net,
287 const char *imsi)
Harald Welte75a983f2008-12-27 21:34:06 +0000288{
Holger Freyther12aa50d2009-01-01 18:02:05 +0000289 struct gsm_subscriber *subscr;
Harald Welte75a983f2008-12-27 21:34:06 +0000290
Jan Luebbe6e300682012-12-25 18:58:34 +0100291 llist_for_each_entry(subscr, subscr_bsc_active_subscribers(), entry) {
Holger Freyther12aa50d2009-01-01 18:02:05 +0000292 if (strcmp(subscr->imsi, imsi) == 0)
293 return subscr_get(subscr);
Harald Welte75a983f2008-12-27 21:34:06 +0000294 }
295
Harald Welte9176bd42009-07-23 18:46:00 +0200296 return db_get_subscriber(net, GSM_SUBSCRIBER_IMSI, imsi);
Harald Welte52b1f982008-12-23 20:25:15 +0000297}
298
Harald Welte9176bd42009-07-23 18:46:00 +0200299struct gsm_subscriber *subscr_get_by_extension(struct gsm_network *net,
300 const char *ext)
Holger Freyther9c564b82009-02-09 23:39:20 +0000301{
302 struct gsm_subscriber *subscr;
303
Jan Luebbe6e300682012-12-25 18:58:34 +0100304 llist_for_each_entry(subscr, subscr_bsc_active_subscribers(), entry) {
Holger Freyther9c564b82009-02-09 23:39:20 +0000305 if (strcmp(subscr->extension, ext) == 0)
306 return subscr_get(subscr);
307 }
308
Harald Welte9176bd42009-07-23 18:46:00 +0200309 return db_get_subscriber(net, GSM_SUBSCRIBER_EXTENSION, ext);
Holger Freyther9c564b82009-02-09 23:39:20 +0000310}
311
Harald Welte76042182009-08-08 16:03:15 +0200312struct gsm_subscriber *subscr_get_by_id(struct gsm_network *net,
313 unsigned long long id)
314{
315 struct gsm_subscriber *subscr;
316 char buf[32];
317 sprintf(buf, "%llu", id);
318
Jan Luebbe6e300682012-12-25 18:58:34 +0100319 llist_for_each_entry(subscr, subscr_bsc_active_subscribers(), entry) {
Harald Welte76042182009-08-08 16:03:15 +0200320 if (subscr->id == id)
321 return subscr_get(subscr);
322 }
323
324 return db_get_subscriber(net, GSM_SUBSCRIBER_ID, buf);
325}
326
Holger Hans Peter Freythere7bd8632013-06-30 15:30:47 +0200327int subscr_update_expire_lu(struct gsm_subscriber *s, struct gsm_bts *bts)
328{
329 int rc;
330
331 /* Table 10.5.33: The T3212 timeout value field is coded as the
332 * binary representation of the timeout value for
333 * periodic updating in decihours. Mark the subscriber as
334 * inactive if it missed two consecutive location updates.
335 * Timeout is twice the t3212 value plus one minute */
336 s->expire_lu = time(NULL) +
337 (bts->si_common.chan_desc.t3212 * 60 * 6 * 2) + 60;
338 rc = db_sync_subscriber(s);
339 db_subscriber_update(s);
340 return rc;
341}
Harald Welte76042182009-08-08 16:03:15 +0200342
Holger Freyther4a49e772009-04-12 05:37:29 +0000343int subscr_update(struct gsm_subscriber *s, struct gsm_bts *bts, int reason)
Harald Welte52b1f982008-12-23 20:25:15 +0000344{
Holger Hans Peter Freythere25445b2010-12-25 19:40:14 +0100345 int rc;
346
Holger Freyther4a49e772009-04-12 05:37:29 +0000347 /* FIXME: Migrate pending requests from one BSC to another */
348 switch (reason) {
349 case GSM_SUBSCRIBER_UPDATE_ATTACHED:
Harald Weltedcaf5652009-07-23 18:56:43 +0200350 s->net = bts->network;
Holger Freyther6d5200b2009-06-02 02:54:38 +0000351 /* Indicate "attached to LAC" */
352 s->lac = bts->location_area_code;
Jan Luebbebfbdeec2012-12-27 00:27:16 +0100353
Holger Hans Peter Freythere7bd8632013-06-30 15:30:47 +0200354 LOGP(DMM, LOGL_INFO, "Subscriber %s ATTACHED LAC=%u\n",
355 subscr_name(s), s->lac);
356
Jan Luebbebfbdeec2012-12-27 00:27:16 +0100357 /* FIXME: We should allow 0 for T3212 as well to disable the
358 * location update period. In that case we will need a way to
359 * indicate that in the database and then reenable that value in
360 * VTY.
361 */
Holger Hans Peter Freythere7bd8632013-06-30 15:30:47 +0200362 /*
363 * The below will set a new expire_lu but as a side-effect
364 * the new lac will be saved in the database.
365 */
366 rc = subscr_update_expire_lu(s, bts);
Pablo Neira Ayusobbc5b992011-05-06 12:12:31 +0200367 osmo_signal_dispatch(SS_SUBSCR, S_SUBSCR_ATTACHED, s);
Holger Freyther4a49e772009-04-12 05:37:29 +0000368 break;
369 case GSM_SUBSCRIBER_UPDATE_DETACHED:
Holger Freytherc3d4b2d2009-06-04 14:27:39 +0000370 /* Only detach if we are currently in this area */
371 if (bts->location_area_code == s->lac)
Holger Hans Peter Freythere48b9562009-10-01 04:07:15 +0200372 s->lac = GSM_LAC_RESERVED_DETACHED;
Harald Welte2e6d4682009-12-24 14:50:24 +0100373 LOGP(DMM, LOGL_INFO, "Subscriber %s DETACHED\n", subscr_name(s));
Holger Hans Peter Freythere25445b2010-12-25 19:40:14 +0100374 rc = db_sync_subscriber(s);
375 db_subscriber_update(s);
Pablo Neira Ayusobbc5b992011-05-06 12:12:31 +0200376 osmo_signal_dispatch(SS_SUBSCR, S_SUBSCR_DETACHED, s);
Holger Freyther4a49e772009-04-12 05:37:29 +0000377 break;
378 default:
379 fprintf(stderr, "subscr_update with unknown reason: %d\n",
380 reason);
Holger Hans Peter Freythere25445b2010-12-25 19:40:14 +0100381 rc = db_sync_subscriber(s);
382 db_subscriber_update(s);
Holger Freyther4a49e772009-04-12 05:37:29 +0000383 break;
384 };
Holger Hans Peter Freythere25445b2010-12-25 19:40:14 +0100385
386 return rc;
Holger Freyther12aa50d2009-01-01 18:02:05 +0000387}
388
Holger Hans Peter Freytherabd0cac2010-12-22 18:12:11 +0100389void subscr_update_from_db(struct gsm_subscriber *sub)
390{
391 db_subscriber_update(sub);
392}
Holger Hans Peter Freytherebdd3cb2010-12-28 22:12:30 +0100393
Jan Luebbebfbdeec2012-12-27 00:27:16 +0100394static void subscr_expire_callback(void *data, long long unsigned int id)
395{
396 struct gsm_network *net = data;
Holger Hans Peter Freythere7bd8632013-06-30 15:30:47 +0200397 struct gsm_subscriber *s = subscr_get_by_id(net, id);
398 struct gsm_subscriber_connection *conn = connection_for_subscr(s);
399
400 /*
401 * The subscriber is active and the phone stopped the timer. As
402 * we don't want to periodically update the database for active
403 * subscribers we will just do it when the subscriber was selected
404 * for expiration. This way on the next around another subscriber
405 * will be selected.
406 */
407 if (conn && conn->expire_timer_stopped) {
408 LOGP(DMM, LOGL_DEBUG, "Not expiring subscriber %s (ID %llu)\n",
409 subscr_name(s), id);
410 subscr_update_expire_lu(s, conn->bts);
411 return;
412 }
413
Jan Luebbebfbdeec2012-12-27 00:27:16 +0100414
Holger Hans Peter Freyther81cff912013-07-04 20:22:27 +0200415 LOGP(DMM, LOGL_NOTICE, "Expiring inactive subscriber %s (ID %llu)\n",
Jan Luebbebfbdeec2012-12-27 00:27:16 +0100416 subscr_name(s), id);
417 s->lac = GSM_LAC_RESERVED_DETACHED;
418 db_sync_subscriber(s);
419
420 subscr_put(s);
421}
422
423void subscr_expire(struct gsm_network *net)
424{
425 db_subscriber_expire(net, subscr_expire_callback);
426}
427
Holger Hans Peter Freytherebdd3cb2010-12-28 22:12:30 +0100428int subscr_pending_requests(struct gsm_subscriber *sub)
429{
430 struct subscr_request *req;
431 int pending = 0;
432
433 llist_for_each_entry(req, &sub->requests, entry)
434 pending += 1;
435
436 return pending;
437}
Holger Hans Peter Freytherfc857412010-12-28 22:21:55 +0100438
439int subscr_pending_clear(struct gsm_subscriber *sub)
440{
441 int deleted = 0;
442 struct subscr_request *req, *tmp;
443
444 llist_for_each_entry_safe(req, tmp, &sub->requests, entry) {
445 subscr_put(req->subscr);
446 llist_del(&req->entry);
447 talloc_free(req);
448 deleted += 1;
449 }
450
451 return deleted;
452}
Holger Hans Peter Freyther763b42a2010-12-29 11:07:22 +0100453
454int subscr_pending_dump(struct gsm_subscriber *sub, struct vty *vty)
455{
456 struct subscr_request *req;
457
458 vty_out(vty, "Pending Requests for Subscriber %llu.%s", sub->id, VTY_NEWLINE);
459 llist_for_each_entry(req, &sub->requests, entry) {
460 vty_out(vty, "Channel type: %d State: %d Sub: %llu.%s",
461 req->channel_type, req->state, req->subscr->id, VTY_NEWLINE);
462 }
463
464 return 0;
465}
Holger Hans Peter Freyther451eb292010-12-29 13:45:49 +0100466
467int subscr_pending_kick(struct gsm_subscriber *sub)
468{
469 subscr_put_channel(sub);
470 return 0;
471}