diff options
author | Patrick McHardy <kaber@trash.net> | 2010-08-26 02:00:30 +0200 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-08-26 02:00:39 +0200 |
commit | 6a9b663d148354ad698945db8c35fba527b9bba7 (patch) | |
tree | 2c1c44ed8e019b19c0ec70f8e5523678757c4752 | |
parent | fb12b53aa180df50fde494598166012dbd2bb83b (diff) |
example: set IPUI in PP examples
Signed-off-by: Patrick McHardy <kaber@trash.net>
-rw-r--r-- | example/Makefile.in | 2 | ||||
-rw-r--r-- | example/common.h | 2 | ||||
-rw-r--r-- | example/pp-access-rights-terminate.c | 3 | ||||
-rw-r--r-- | example/pp-common.c | 8 | ||||
-rw-r--r-- | example/pp-detach.c | 3 | ||||
-rw-r--r-- | example/pp-info-request.c | 3 | ||||
-rw-r--r-- | example/pp-list-access.c | 3 | ||||
-rw-r--r-- | example/pp-location-update.c | 3 | ||||
-rw-r--r-- | example/pp-wait-page.c | 5 |
9 files changed, 18 insertions, 14 deletions
diff --git a/example/Makefile.in b/example/Makefile.in index 219519c..86787e0 100644 --- a/example/Makefile.in +++ b/example/Makefile.in @@ -52,7 +52,7 @@ pp-list-access-obj += $(pp-common-obj) pp-list-access-obj += pp-list-access.o pp-wait-page-destdir := $(destdir) -pp-wait-page-obj += $(common-obj) +pp-wait-page-obj += $(pp-common-obj) pp-wait-page-obj += pp-wait-page.o discover-destdir:= $(destdir) diff --git a/example/common.h b/example/common.h index 24621e4..2e80e4a 100644 --- a/example/common.h +++ b/example/common.h @@ -24,6 +24,8 @@ extern int dect_read_uak(const struct dect_ipui *ipui, extern void dect_pp_auth_init(struct dect_ops *ops, const struct dect_ipui *ipui); +extern void dect_pp_common_init(struct dect_ops *ops, const char *cluster, + const struct dect_ipui *ipui); extern void dect_pp_init_terminal_capability(struct dect_ie_terminal_capability *tcap); struct mm_auth_priv { diff --git a/example/pp-access-rights-terminate.c b/example/pp-access-rights-terminate.c index 87cc7c0..4a2e713 100644 --- a/example/pp-access-rights-terminate.c +++ b/example/pp-access-rights-terminate.c @@ -53,8 +53,7 @@ int main(int argc, char **argv) { struct dect_mm_endpoint *mme; - dect_pp_auth_init(&ops, &ipui); - dect_common_init(&ops, argv[1]); + dect_pp_common_init(&ops, argv[1], &ipui); mme = dect_mm_endpoint_alloc(dh, &ipui); if (mme == NULL) diff --git a/example/pp-common.c b/example/pp-common.c index 1b13959..5d1e9e2 100644 --- a/example/pp-common.c +++ b/example/pp-common.c @@ -34,3 +34,11 @@ void dect_pp_init_terminal_capability(struct dect_ie_terminal_capability *tcap) DECT_PROFILE_NG_DECT_PART_1 | DECT_PROFILE_NG_DECT_PART_3; } + +void dect_pp_common_init(struct dect_ops *ops, const char *cluster, + const struct dect_ipui *ipui) +{ + dect_pp_auth_init(ops, ipui); + dect_common_init(ops, cluster); + dect_pp_set_ipui(dh, ipui); +} diff --git a/example/pp-detach.c b/example/pp-detach.c index ad6f956..fd9b6c7 100644 --- a/example/pp-detach.c +++ b/example/pp-detach.c @@ -39,8 +39,7 @@ int main(int argc, char **argv) { struct dect_mm_endpoint *mme; - dect_pp_auth_init(&ops, &ipui); - dect_common_init(&ops, argv[1]); + dect_pp_common_init(&ops, argv[1], &ipui); mme = dect_mm_endpoint_alloc(dh, &ipui); if (mme == NULL) diff --git a/example/pp-info-request.c b/example/pp-info-request.c index cb0d22b..6a583e6 100644 --- a/example/pp-info-request.c +++ b/example/pp-info-request.c @@ -57,8 +57,7 @@ int main(int argc, char **argv) { struct dect_mm_endpoint *mme; - dect_pp_auth_init(&ops, &ipui); - dect_common_init(&ops, argv[1]); + dect_pp_common_init(&ops, argv[1], &ipui); mme = dect_mm_endpoint_alloc(dh, &ipui); if (mme == NULL) diff --git a/example/pp-list-access.c b/example/pp-list-access.c index 9d24469..e0f46ab 100644 --- a/example/pp-list-access.c +++ b/example/pp-list-access.c @@ -79,8 +79,7 @@ int main(int argc, char **argv) { const struct dect_fp_capabilities *fpc; - dect_pp_auth_init(&ops, &ipui); - dect_common_init(&ops, argv[1]); + dect_pp_common_init(&ops, argv[1], &ipui); fpc = dect_llme_fp_capabilities(dh); if (!(fpc->ehlc2 & DECT_EHLC2_LIST_ACCESS_FEATURES)) { diff --git a/example/pp-location-update.c b/example/pp-location-update.c index 19ac39a..dd00897 100644 --- a/example/pp-location-update.c +++ b/example/pp-location-update.c @@ -68,8 +68,7 @@ int main(int argc, char **argv) const struct dect_fp_capabilities *fpc; struct dect_mm_endpoint *mme; - dect_pp_auth_init(&ops, &ipui); - dect_common_init(&ops, argv[1]); + dect_pp_common_init(&ops, argv[1], &ipui); fpc = dect_llme_fp_capabilities(dh); if (!(fpc->hlc & DECT_HLC_LOCATION_REGISTRATION)) { diff --git a/example/pp-wait-page.c b/example/pp-wait-page.c index 7696e7b..9991a28 100644 --- a/example/pp-wait-page.c +++ b/example/pp-wait-page.c @@ -1,5 +1,5 @@ /* - * DECT PP location update example + * DECT PP paging example * * Copyright (c) 2010 Patrick McHardy <kaber@trash.net> * @@ -24,8 +24,7 @@ static struct dect_ops ops; int main(int argc, char **argv) { - dect_common_init(&ops, argv[1]); - dect_pp_set_ipui(dh, &ipui); + dect_pp_common_init(&ops, argv[1], &ipui); dect_event_loop(); |