[PATCH] osmocom-bb[master]: mobile: Properly close the primitive interface on reload
Review at https://gerrit.osmocom.org/5595 mobile: Properly close the primitive interface on reload When reloading a script go through script_lua_close. Get the primitive first. Then destruct the lua environment which will lead to GC (e.g. cancellation of timers) and then delete the primitive code. Change-Id: I5bb4fa9e7c5010f3ad50b258dcb14956eea8822a --- M src/host/layer23/src/mobile/script_lua.c 1 file changed, 6 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/95/5595/1 diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c index 14ab58f..9b256d3 100644 --- a/src/host/layer23/src/mobile/script_lua.c +++ b/src/host/layer23/src/mobile/script_lua.c @@ -510,10 +510,14 @@ int script_lua_close(struct osmocom_ms *ms) { + struct mobile_prim_intf *intf; + if (!ms->lua_state) return 0; + intf = get_primitive(ms->lua_state); lua_close(ms->lua_state); + mobile_prim_intf_free(intf); ms->lua_state = NULL; return 0; } @@ -523,8 +527,7 @@ struct mobile_prim_intf *intf; int err; - if (ms->lua_state) - lua_close(ms->lua_state); + script_lua_close(ms); ms->lua_state = lua_newstate(talloc_lua_alloc, ms); if (!ms->lua_state) return -1; @@ -550,7 +553,7 @@ vty_out(vty, "%% LUA execute error: %s%s", lua_tostring(ms->lua_state, -1), VTY_NEWLINE); lua_pop(ms->lua_state, 1); - return 3; + return -3; } return 0; -- To view, visit https://gerrit.osmocom.org/5595 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5bb4fa9e7c5010f3ad50b258dcb14956eea8822a Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther
[PATCH] osmocom-bb[master]: mobile: Add lua examples for basic functions that are available
Review at https://gerrit.osmocom.org/5596 mobile: Add lua examples for basic functions that are available Link to Lua docs, link to our manual. Demo logging, timer, MS on/off, sms sending and sms receiving. For the MM state I will need to export constants/names to make this usable. Currently it is a bit of a hack (first time to MM_IDLE) to send a SMS. We would know when we attached though. Change-Id: I10ac656330b65e3905d6cbbb7865aa0f969cd9ff --- A doc/examples/mobile/lua_helloworld.lua A doc/examples/mobile/lua_ms_on_off.lua A doc/examples/mobile/lua_sms_on_attach.lua A doc/examples/mobile/lua_sms_receive.lua A doc/examples/mobile/lua_timer.lua 5 files changed, 91 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/96/5596/1 diff --git a/doc/examples/mobile/lua_helloworld.lua b/doc/examples/mobile/lua_helloworld.lua new file mode 100644 index 000..fd5abcc --- /dev/null +++ b/doc/examples/mobile/lua_helloworld.lua @@ -0,0 +1,9 @@ +-- See https://www.lua.org/manual/5.3/ for Lua +-- See http://ftp.osmocom.org/docs/latest/osmocombb-usermanual.pdf -- Scripting with Lua + +-- Standard print and log_* are forwarded to the Osmocom logging framework +print("Hellp from Lua"); +log_notice("Notice from lua"); +log_debug("Debug from Lua"); +log_error("Error from Lua"); +log_fatal("Fatal from Lua"); diff --git a/doc/examples/mobile/lua_ms_on_off.lua b/doc/examples/mobile/lua_ms_on_off.lua new file mode 100644 index 000..57e492d --- /dev/null +++ b/doc/examples/mobile/lua_ms_on_off.lua @@ -0,0 +1,23 @@ +-- See https://www.lua.org/manual/5.3/ for Lua +-- See http://ftp.osmocom.org/docs/latest/osmocombb-usermanual.pdf -- Scripting with Lua + + +-- Switch the MS on/off but this can only be done if the MS +-- is in the right state. This assumes that the MS is fully +-- connected and doesn't stall. + +local start = false +osmo.ms().start() +function toggle_ms_state() + timer = osmo.timeout(20, function() + if start then + print("STARTING", osmo.ms().start()) + start = false + else + print("STOPPING", osmo.ms().stop(true)) + start = true + end + toggle_ms_state() + end) +end +toggle_ms_state() diff --git a/doc/examples/mobile/lua_sms_on_attach.lua b/doc/examples/mobile/lua_sms_on_attach.lua new file mode 100644 index 000..8d73f2f --- /dev/null +++ b/doc/examples/mobile/lua_sms_on_attach.lua @@ -0,0 +1,32 @@ +-- See https://www.lua.org/manual/5.3/ for Lua +-- See http://ftp.osmocom.org/docs/latest/osmocombb-usermanual.pdf -- Scripting with Lua + + +-- State change +local sent_sms = false +function mm_cb(new_state, new_substate, old_substate) + -- The system has attached and returned to idle. Send a SMS the first time + -- it happens. + if new_state == 19 and new_substate == 1 then + if not sent_sms then + sent_sms = true + osmo.ms():sms_send_simple("1234", "21321324", "fooo", 23) + end + end +end + +-- Called when a new SMS arrives or status for delivery +-- is updated. Check the msg_ref field. +function sms_cb(sms, cause, valid) + print("SMS data cb", sms, cause, valid) + for i, v in pairs(sms) do + print(i, v) + end +end + +-- We need to register a callback +local cbs = { + Sms=sms_cb, + Mm=mm_cb +} +osmo.ms():register(cbs) diff --git a/doc/examples/mobile/lua_sms_receive.lua b/doc/examples/mobile/lua_sms_receive.lua new file mode 100644 index 000..4be4e0a --- /dev/null +++ b/doc/examples/mobile/lua_sms_receive.lua @@ -0,0 +1,15 @@ +-- See https://www.lua.org/manual/5.3/ for Lua +-- See http://ftp.osmocom.org/docs/latest/osmocombb-usermanual.pdf -- Scripting with Lua + +function sms_cb(sms, cause, valid) + print("SMS data cb", sms, cause, valid) + for i, v in pairs(sms) do + print(i, v) + end +end + +local cbs = { + Sms=sms_cb, +} + +osmo.ms():register(cbs) diff --git a/doc/examples/mobile/lua_timer.lua b/doc/examples/mobile/lua_timer.lua new file mode 100644 index 000..1119af8 --- /dev/null +++ b/doc/examples/mobile/lua_timer.lua @@ -0,0 +1,12 @@ +-- See https://www.lua.org/manual/5.3/ for Lua +-- See http://ftp.osmocom.org/docs/latest/osmocombb-usermanual.pdf -- Scripting with Lua + +-- Start and stop timer with callback. Schedule a timeout and +-- resume execution then. + +-- Timeout in 10 seconds +local timer = osmo.timeout(10, function() + print("Timeout occurred"); +end) +-- We can cancel it. The callback will not be called +timer:cancel() -- To view, visit https://gerrit.osmocom.org/5596 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I10ac656330b65e3905d6cbbb7865aa0f969cd9ff Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch:
[PATCH] osmocom-bb[master]: mobile: Send SMS through the primitive interface
Review at https://gerrit.osmocom.org/5594 mobile: Send SMS through the primitive interface Make this symmetric and send the SMS through the primitive interface. Construct and copy the sms into the prim, store the SCA in the prim as well. In 04.11 we see we can store 2*10 digits in the destination address and a NUL. Change-Id: I91d7537f4f6ce5ba00218c58f3456947ec7bc662 --- M src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h M src/host/layer23/include/osmocom/bb/mobile/primitives.h M src/host/layer23/src/mobile/gsm411_sms.c M src/host/layer23/src/mobile/primitives.c M src/host/layer23/src/mobile/script_lua.c 5 files changed, 39 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/94/5594/1 diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h b/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h index d3074fb..3ed6710 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h +++ b/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h @@ -35,5 +35,7 @@ int gsm411_rcv_sms(struct osmocom_ms *ms, struct msgb *msg); int sms_send(struct osmocom_ms *ms, const char *sms_sca, const char *number, const char *text, uint8_t msg_ref); +int gsm411_tx_sms_submit(struct osmocom_ms *ms, const char *sms_sca, + struct gsm_sms *sms); #endif /* _GSM411_SMS_H */ diff --git a/src/host/layer23/include/osmocom/bb/mobile/primitives.h b/src/host/layer23/include/osmocom/bb/mobile/primitives.h index 39b4945..034b202 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/primitives.h +++ b/src/host/layer23/include/osmocom/bb/mobile/primitives.h @@ -62,6 +62,8 @@ struct mobile_sms_param { struct gsm_sms sms; + char sca[20+1]; /*sms; + + /* Force a NUL at the end of the string */ + param->sca[sizeof(param->sca) - 1] = '\0'; + + return gsm411_tx_sms_submit(intf->ms, param->sca, sms); +} + int mobile_prim_intf_req(struct mobile_prim_intf *intf, struct mobile_prim *prim) { int rc = 0; @@ -184,6 +197,9 @@ case OSMO_PRIM(PRIM_MOB_TIMER_CANCEL, PRIM_OP_REQUEST): rc = cancel_timer(intf, >u.timer); break; + case OSMO_PRIM(PRIM_MOB_SMS, PRIM_OP_REQUEST): + rc = send_sms(intf, >u.sms); + break; default: LOGP(DPRIM, LOGL_ERROR, "Unknown primitive: %d\n", OSMO_PRIM_HDR(>hdr)); break; diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c index 1b80c48..14ab58f 100644 --- a/src/host/layer23/src/mobile/script_lua.c +++ b/src/host/layer23/src/mobile/script_lua.c @@ -372,7 +372,9 @@ static int lua_ms_sms_send_simple(lua_State *L) { const char *sms_sca, *number, *text; - int msg_ref, rc; + struct mobile_prim *prim; + struct gsm_sms *sms; + int msg_ref; luaL_argcheck(L, lua_isnumber(L, -1), 4, "msg_ref needs to be a number"); luaL_argcheck(L, lua_isstring(L, -2), 3, "text must be a string"); @@ -384,8 +386,21 @@ number = lua_tostring(L, -3); sms_sca = lua_tostring(L, -4); - rc = sms_send(get_primitive(L)->ms, sms_sca, number, text, msg_ref); - lua_pushinteger(L, rc); + prim = mobile_prim_alloc(PRIM_MOB_SMS, PRIM_OP_REQUEST); + + sms = sms_from_text(number, 0, text); + if (!sms) { + lua_pushinteger(L, -ENOMEM); + msgb_free(prim->hdr.msg); + return 1; + } + + prim->u.sms.sms = *sms; + prim->u.sms.sms.msg_ref = msg_ref; + osmo_strlcpy(prim->u.sms.sca, sms_sca, sizeof(prim->u.sms.sca)); + mobile_prim_intf_req(get_primitive(L), prim); + + lua_pushinteger(L, 0); return 1; } -- To view, visit https://gerrit.osmocom.org/5594 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I91d7537f4f6ce5ba00218c58f3456947ec7bc662 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther
osmo-bsc[master]: abisip-find: add --interval option
Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5590/1/src/ipaccess/abisip-find.c File src/ipaccess/abisip-find.c: PS1, Line 90: send_interval might be worth to check for interval==0 and reject it -- To view, visit https://gerrit.osmocom.org/5590 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9540054bdda185b2585209289cee565f61f33dcf Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes
osmo-iuh[master]: Add control interface
Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5591/1/include/osmocom/iuh/hnbgw.h File include/osmocom/iuh/hnbgw.h: Line 123: struct ctrl_handle *ctrl; this is not really 'configuration' and hence doesn't belong into the 'config' structure. -- To view, visit https://gerrit.osmocom.org/5591 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4637e88da00bac1ab0237c29ac73806d024863ba Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes
[MERGED] osmo-sgsn[master]: cosmetic: use macro for gtphub plane iteration
Harald Welte has submitted this change and it was merged. Change subject: cosmetic: use macro for gtphub plane iteration .. cosmetic: use macro for gtphub plane iteration Change-Id: If82fcd9f6509da60e6f0d916fe107de1b38bfd18 --- M src/gprs/gtphub.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gprs/gtphub.c b/src/gprs/gtphub.c index 5e962f2..76eebb1 100644 --- a/src/gprs/gtphub.c +++ b/src/gprs/gtphub.c @@ -1517,7 +1517,7 @@ int ie_mandatory = (p->type == GTP_CREATE_PDP_REQ); unsigned int side_idx = p->side_idx; - for (plane_idx = 0; plane_idx < 2; plane_idx++) { + for_each_plane(plane_idx) { int rc; struct gsn_addr use_addr; uint16_t use_port; -- To view, visit https://gerrit.osmocom.org/5528 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If82fcd9f6509da60e6f0d916fe107de1b38bfd18 Gerrit-PatchSet: 2 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
[MERGED] osmo-sgsn[master]: Use connection id when allocating rate counters
Harald Welte has submitted this change and it was merged. Change subject: Use connection id when allocating rate counters .. Use connection id when allocating rate counters Due to recent libosmocore's change we can't allocate rate counters with the same name and index which are already allocated. This causes sgsn_mm_ctx_alloc_iu() failure for multiple subscribers. Fix this by using conn_id parameter from ranap_ue_conn_ctx. Change-Id: I1062ffdcac96c82269cab6f4e7ae50e28dc3aa44 Related: OS#2757 --- M src/gprs/gprs_sgsn.c 1 file changed, 5 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gprs/gprs_sgsn.c b/src/gprs/gprs_sgsn.c index 768d953..c4321f9 100644 --- a/src/gprs/gprs_sgsn.c +++ b/src/gprs/gprs_sgsn.c @@ -255,21 +255,23 @@ { #if BUILD_IU struct sgsn_mm_ctx *ctx; + struct ranap_ue_conn_ctx *ue_ctx = uectx; ctx = talloc_zero(tall_bsc_ctx, struct sgsn_mm_ctx); if (!ctx) return NULL; ctx->ran_type = MM_CTX_T_UTRAN_Iu; - ctx->iu.ue_ctx = uectx; + ctx->iu.ue_ctx = ue_ctx; ctx->iu.ue_ctx->rab_assign_addr_enc = sgsn->cfg.iu.rab_assign_addr_enc; ctx->iu.new_key = 1; ctx->gmm_state = GMM_DEREGISTERED; ctx->pmm_state = PMM_DETACHED; ctx->auth_triplet.key_seq = GSM_KEY_SEQ_INVAL; - ctx->ctrg = rate_ctr_group_alloc(ctx, _ctrg_desc, 0); + ctx->ctrg = rate_ctr_group_alloc(ctx, _ctrg_desc, ue_ctx->conn_id); if (!ctx->ctrg) { - LOGMMCTXP(LOGL_ERROR, ctx, "Cannot allocate counter group\n"); + LOGMMCTXP(LOGL_ERROR, ctx, "Cannot allocate counter group for %s.%u\n", + mmctx_ctrg_desc.group_name_prefix, ue_ctx->conn_id); talloc_free(ctx); return NULL; } -- To view, visit https://gerrit.osmocom.org/5523 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1062ffdcac96c82269cab6f4e7ae50e28dc3aa44 Gerrit-PatchSet: 4 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr
osmo-sgsn[master]: gtphub: make rate_ctr unique
Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5524 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0e07f95c36de369bcd0691b8d0fd47c844abe5da Gerrit-PatchSet: 4 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
osmo-sgsn[master]: cosmetic: use macro for gtphub plane iteration
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5528 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If82fcd9f6509da60e6f0d916fe107de1b38bfd18 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-sgsn[master]: Migrate from OpenSSL to osmo_get_rand_id()
Patch Set 9: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/3821 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2b687b7f07ef05bbd861b8479cad5a958a3dde92 Gerrit-PatchSet: 9 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-msc[master]: Migrate from OpenSSL to osmo_get_rand_id()
Patch Set 7: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/3820 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I71cd631704a4dc155c6c752fee2a42cd6e2fa336 Gerrit-PatchSet: 7 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
osmo-bsc[master]: Migrate from OpenSSL to osmo_get_rand_id()
Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/3819 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia57bf1300525cf3c247284fe966b1c415c2d53e2 Gerrit-PatchSet: 6 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
Build failure of network:osmocom:nightly/osmo-iuh in Debian_9.0/armv7l
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_9.0/armv7l Package network:osmocom:nightly/osmo-iuh failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 1153s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 1153s] make[5]: *** [hnbgw_vty.o] Error 1 [ 1153s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 1153s] Makefile:639: recipe for target 'all-recursive' failed [ 1153s] make[4]: *** [all-recursive] Error 1 [ 1153s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 1153s] Makefile:451: recipe for target 'all' failed [ 1153s] make[3]: *** [all] Error 2 [ 1153s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 1153s] Makefile:452: recipe for target 'all-recursive' failed [ 1153s] make[2]: *** [all-recursive] Error 1 [ 1153s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 1153s] Makefile:376: recipe for target 'all' failed [ 1153s] make[1]: *** [all] Error 2 [ 1153s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 1153s] dh_auto_build: make -j1 returned exit code 2 [ 1153s] debian/rules:9: recipe for target 'build' failed [ 1153s] make: *** [build] Error 2 [ 1153s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 1153s] [ 1153s] armbuild19 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 21:22:02 UTC 2017. [ 1153s] [ 1153s] ### VM INTERACTION START ### [ 1156s] [ 1105.864696] SysRq : Power Off [ 1156s] [ 1105.866114] reboot: Power down [ 1156s] ### VM INTERACTION END ### [ 1156s] [ 1156s] armbuild19 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 21:22:06 UTC 2017. [ 1156s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
[MERGED] osmo-bsc[master]: abisip-find: add timeout option
Harald Welte has submitted this change and it was merged. Change subject: abisip-find: add timeout option .. abisip-find: add timeout option Change-Id: I3b30e2b9cac9c70ba8d272022eee596de39d7b82 --- M src/ipaccess/abisip-find.c 1 file changed, 17 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ipaccess/abisip-find.c b/src/ipaccess/abisip-find.c index cba8a7a..d94e18a 100644 --- a/src/ipaccess/abisip-find.c +++ b/src/ipaccess/abisip-find.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -39,9 +40,11 @@ static struct { const char *ifname; bool list_view; + time_t list_view_timeout; } cmdline_opts = { .ifname = NULL, .list_view = false, + .list_view_timeout = 10, }; static void print_help() @@ -53,6 +56,9 @@ printf(" -l --list-viewInstead of printing received responses,\n" "output a sorted list of currently present\n" "base stations and change events.\n"); + printf(" -t --timeout Drop base stations after seconds of\n" + "receiving no more replies from it.\n" + "Implies --list-view.\n"); } static void handle_options(int argc, char **argv) @@ -62,10 +68,11 @@ static struct option long_options[] = { {"help", 0, 0, 'h'}, {"list-view", 0, 0, 'l'}, + {"timeout", 1, 0, 't'}, {0, 0, 0, 0} }; - c = getopt_long(argc, argv, "hl", + c = getopt_long(argc, argv, "hlt:", long_options, _index); if (c == -1) break; @@ -74,6 +81,14 @@ case 'h': print_help(); exit(EXIT_SUCCESS); + case 't': + errno = 0; + cmdline_opts.list_view_timeout = strtoul(optarg, NULL, 10); + if (errno) { + fprintf(stderr, "Invalid timeout value: %s\n", optarg); + exit(EXIT_FAILURE); + } + /* fall through to imply list-view: */ case 'l': cmdline_opts.list_view = true; break; @@ -247,7 +262,7 @@ bool changed = false; llist_for_each_entry_safe(bs, next_bs, _stations, entry) { - if (now - bs->timestamp < 10) + if (now - bs->timestamp < cmdline_opts.list_view_timeout) continue; print_timestamp(); printf("LOST:\n%s\n", bs->line); -- To view, visit https://gerrit.osmocom.org/5589 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3b30e2b9cac9c70ba8d272022eee596de39d7b82 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
[MERGED] osmo-bsc[master]: abisip-find: add getopt option parsing in preparation for a ...
Harald Welte has submitted this change and it was merged. Change subject: abisip-find: add getopt option parsing in preparation for a new option .. abisip-find: add getopt option parsing in preparation for a new option Subsequent patch I4201876431029b303dbd10e46492228379c9782a will add the -l cmdline option. Add getopt in a separate step here to keep the patch lean. Change-Id: Idba1a89753510fe6d409277b20c2db86c1b8f7f8 --- M src/ipaccess/abisip-find.c 1 file changed, 55 insertions(+), 7 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ipaccess/abisip-find.c b/src/ipaccess/abisip-find.c index c459161..46205dd 100644 --- a/src/ipaccess/abisip-find.c +++ b/src/ipaccess/abisip-find.c @@ -24,13 +24,63 @@ #include #include #include - +#include #include #include #include #include #include + +static struct { + const char *ifname; +} cmdline_opts = { + .ifname = NULL, +}; + +static void print_help() +{ + printf("\n"); + printf("Usage: abisip-find [-l] []\n"); + printf("Specify the outgoing network interface,\n" + "e.g. 'eth0'\n"); +} + +static void handle_options(int argc, char **argv) +{ + while (1) { + int option_index = 0, c; + static struct option long_options[] = { + {"help", 0, 0, 'h'}, + {0, 0, 0, 0} + }; + + c = getopt_long(argc, argv, "h", + long_options, _index); + if (c == -1) + break; + + switch (c) { + case 'h': + print_help(); + exit(EXIT_SUCCESS); + default: + /* catch unknown options *as well as* missing arguments. */ + fprintf(stderr, "Error in command line options. Exiting. Try --help.\n"); + exit(EXIT_FAILURE); + break; + } + } + + if (argc - optind > 0) + cmdline_opts.ifname = argv[optind++]; + + if (argc - optind > 0) { + fprintf(stderr, "Error: too many arguments\n"); + print_help(); + exit(EXIT_FAILURE); + } +} static int udp_sock(const char *ifname) { @@ -173,22 +223,20 @@ int main(int argc, char **argv) { struct osmo_fd bfd; - char *ifname = NULL; int rc; printf("abisip-find (C) 2009 by Harald Welte\n"); printf("This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY\n\n"); - if (argc < 2) { + handle_options(argc, argv); + + if (!cmdline_opts.ifname) fprintf(stdout, "you might need to specify the outgoing\n" " network interface, e.g. ``%s eth0''\n", argv[0]); - } else { - ifname = argv[1]; - } bfd.cb = bfd_cb; bfd.when = BSC_FD_READ | BSC_FD_WRITE; - bfd.fd = udp_sock(ifname); + bfd.fd = udp_sock(cmdline_opts.ifname); if (bfd.fd < 0) { perror("Cannot create local socket for broadcast udp"); exit(1); -- To view, visit https://gerrit.osmocom.org/5586 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idba1a89753510fe6d409277b20c2db86c1b8f7f8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
[MERGED] osmo-bsc[master]: abisip-find: add -l to list base stations instead of streami...
Harald Welte has submitted this change and it was merged. Change subject: abisip-find: add -l to list base stations instead of streaming replies .. abisip-find: add -l to list base stations instead of streaming replies To get an overview of what base stations are present in a network, particularly with many base stations being present, it is particularly useful to get a list of connected base stations instead of just output of received replies. Keep a sorted list of known base stations, which time out after 10 seconds. Print additions and removals, and total amount of replies received. On each change, print the entire list. Output a running total of replies received, to provide comfort to the reader that something is still happening, and to confirm that the shown listing is still up-to-date (updated on the same line by means of '\r'). It looks like: - Mon Dec 25 18:59:43 2017 0: MAC_Address='00:02:95:07:dc:bd' IP_Address='192.168.0.124' Unit_ID='1/1/1' Location_1='Unknown' Location_2='3GAP' Equipment_Version='237B015_C' Software_Version='unknown' Unit_Name='Unknown' Serial_Number='000295-152614' 1: MAC_Address='00:02:95:07:dd:57' IP_Address='192.168.0.15' Unit_ID='1/1/1' Location_1='Unknown' Location_2='3GAP' Equipment_Version='237B015_C' Software_Version='unknown' Unit_Name='Unknown' Serial_Number='000295-154153' Total: 2 RX: 11 - Mon Dec 25 19:00:12 2017 LOST: MAC_Address='00:02:95:07:dd:57' IP_Address='192.168.0.15' Unit_ID='1/1/1' Location_1='Unknown' Location_2='3GAP' Equipment_Version='237B015_C' Software_Version='unknown' Unit_Name='Unknown' Serial_Number='000295-154153' - Mon Dec 25 19:00:12 2017 0: MAC_Address='00:02:95:07:dc:bd' IP_Address='192.168.0.124' Unit_ID='1/1/1' Location_1='Unknown' Location_2='3GAP' Equipment_Version='237B015_C' Software_Version='unknown' Unit_Name='Unknown' Serial_Number='000295-152614' Total: 1 RX: 15 - Mon Dec 25 19:00:28 2017 New: MAC_Address='00:02:95:07:dd:57' IP_Address='192.168.0.15' Unit_ID='1/1/1' Location_1='Unknown' Location_2='3GAP' Equipment_Version='237B015_C' Software_Version='unknown' Unit_Name='Unknown' Serial_Number='000295-154153' - Mon Dec 25 19:00:28 2017 0: MAC_Address='00:02:95:07:dc:bd' IP_Address='192.168.0.124' Unit_ID='1/1/1' Location_1='Unknown' Location_2='3GAP' Equipment_Version='237B015_C' Software_Version='unknown' Unit_Name='Unknown' Serial_Number='000295-152614' 1: MAC_Address='00:02:95:07:dd:57' IP_Address='192.168.0.15' Unit_ID='1/1/1' Location_1='Unknown' Location_2='3GAP' Equipment_Version='237B015_C' Software_Version='unknown' Unit_Name='Unknown' Serial_Number='000295-154153' RX: 18 Change-Id: I4201876431029b303dbd10e46492228379c9782a --- M src/ipaccess/abisip-find.c 1 file changed, 140 insertions(+), 8 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ipaccess/abisip-find.c b/src/ipaccess/abisip-find.c index 46205dd..2f8d80f 100644 --- a/src/ipaccess/abisip-find.c +++ b/src/ipaccess/abisip-find.c @@ -25,17 +25,22 @@ #include #include #include +#include +#include #include #include +#include #include #include #include static struct { const char *ifname; + bool list_view; } cmdline_opts = { .ifname = NULL, + .list_view = false, }; static void print_help() @@ -44,6 +49,9 @@ printf("Usage: abisip-find [-l] []\n"); printf("Specify the outgoing network interface,\n" "e.g. 'eth0'\n"); + printf(" -l --list-viewInstead of printing received responses,\n" + "output a sorted list of currently present\n" + "base stations and change events.\n"); } static void handle_options(int argc, char **argv) @@ -52,10 +60,11 @@ int option_index = 0, c; static struct option long_options[] = { {"help", 0, 0, 'h'}, + {"list-view", 0, 0, 'l'}, {0, 0, 0, 0} }; - c = getopt_long(argc, argv, "h", + c = getopt_long(argc, argv, "hl", long_options, _index); if (c == -1) break; @@ -64,6 +73,9 @@ case 'h': print_help(); exit(EXIT_SUCCESS); + case 'l': + cmdline_opts.list_view = true; + break; default: /* catch unknown options *as well as* missing arguments. */ fprintf(stderr, "Error in command line options. Exiting. Try --help.\n"); @@ -159,22 +171,137 @@
[MERGED] osmo-bsc[master]: abisip-find: update copyright
Harald Welte has submitted this change and it was merged. Change subject: abisip-find: update copyright .. abisip-find: update copyright Change-Id: Ibb72fa16cc1a8b6809d0510211bfc61a170d1250 --- M src/ipaccess/abisip-find.c 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ipaccess/abisip-find.c b/src/ipaccess/abisip-find.c index 2f8d80f..cba8a7a 100644 --- a/src/ipaccess/abisip-find.c +++ b/src/ipaccess/abisip-find.c @@ -1,6 +1,7 @@ /* ip.access nanoBTS configuration tool */ /* (C) 2009-2010 by Harald Welte+ * (C) 2017 by sysmocom - s.f.m.c. GmbH * All Rights Reserved * * This program is free software; you can redistribute it and/or modify @@ -355,7 +356,8 @@ struct osmo_fd bfd; int rc; - printf("abisip-find (C) 2009 by Harald Welte\n"); + printf("abisip-find (C) 2009-2010 by Harald Welte\n"); + printf("(C) 2017 by sysmocom - s.f.m.c. GmbH\n"); printf("This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY\n\n"); handle_options(argc, argv); -- To view, visit https://gerrit.osmocom.org/5588 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibb72fa16cc1a8b6809d0510211bfc61a170d1250 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
osmo-bsc[master]: abisip-find: update copyright
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5588 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibb72fa16cc1a8b6809d0510211bfc61a170d1250 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-bsc[master]: abisip-find: add timeout option
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5589 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3b30e2b9cac9c70ba8d272022eee596de39d7b82 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-bsc[master]: abisip-find: add -l to list base stations instead of streami...
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5587 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4201876431029b303dbd10e46492228379c9782a Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-bsc[master]: abisip-find: add getopt option parsing in preparation for a ...
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5586 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idba1a89753510fe6d409277b20c2db86c1b8f7f8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
[MERGED] osmo-iuh[master]: hnbgw_vty.c: Fix "-Werror=format-security" failure in vty_out()
Harald Welte has submitted this change and it was merged. Change subject: hnbgw_vty.c: Fix "-Werror=format-security" failure in vty_out() .. hnbgw_vty.c: Fix "-Werror=format-security" failure in vty_out() We have to use a format string, we cannot directly print "name". Fixes a build error on our OBS builds: hnbgw_vty.c:156:5: error: format not a string literal and no format arguments [-Werror=format-security] which was introduced in Change-Id I3c937306a011715e163a40bc8ef8ec7e8d4e5d08 about one week ago. Change-Id: I042989c2b7b379284b2ee5fea3bd8f8ce406b09e --- M src/hnbgw_vty.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index 2c47bba..859cd31 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -153,7 +153,7 @@ vty_out(vty, "(no addr)"); return; } - vty_out(vty, name); + vty_out(vty, "%s", name); talloc_free(name); } -- To view, visit https://gerrit.osmocom.org/5593 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I042989c2b7b379284b2ee5fea3bd8f8ce406b09e Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald WelteGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
[MERGED] osmo-iuh[master]: hnbgw_vty.c: cosmetic: Fix non-tab-indented code
Harald Welte has submitted this change and it was merged. Change subject: hnbgw_vty.c: cosmetic: Fix non-tab-indented code .. hnbgw_vty.c: cosmetic: Fix non-tab-indented code This was introduced a week ago in Change-Id I3c937306a011715e163a40bc8ef8ec7e8d4e5d08 and is now cleaned up. Change-Id: Iaadf941aa7f1c5ae05eb02b51cc646b7b5587ba3 --- M src/hnbgw_vty.c 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index 060319b..2c47bba 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -147,14 +147,14 @@ static void vty_out_ofd_addr(struct vty *vty, struct osmo_fd *ofd) { -char *name; -if (!ofd || ofd->fd < 0 + char *name; + if (!ofd || ofd->fd < 0 || !(name = osmo_sock_get_name(vty, ofd->fd))) { vty_out(vty, "(no addr)"); return; -} -vty_out(vty, name); -talloc_free(name); + } + vty_out(vty, name); + talloc_free(name); } static void vty_dump_hnb_info__map_states(struct vty *vty, const char *name, unsigned int count, -- To view, visit https://gerrit.osmocom.org/5592 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaadf941aa7f1c5ae05eb02b51cc646b7b5587ba3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald WelteGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
osmo-iuh[master]: hnbgw_vty.c: Fix "-Werror=format-security" failure in vty_out()
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5593 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I042989c2b7b379284b2ee5fea3bd8f8ce406b09e Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald WelteGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-iuh[master]: hnbgw_vty.c: cosmetic: Fix non-tab-indented code
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5592 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iaadf941aa7f1c5ae05eb02b51cc646b7b5587ba3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald WelteGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
[PATCH] osmo-iuh[master]: hnbgw_vty.c: Fix "-Werror=format-security" failure in vty_out()
Review at https://gerrit.osmocom.org/5593 hnbgw_vty.c: Fix "-Werror=format-security" failure in vty_out() We have to use a format string, we cannot directly print "name". Fixes a build error on our OBS builds: hnbgw_vty.c:156:5: error: format not a string literal and no format arguments [-Werror=format-security] which was introduced in Change-Id I3c937306a011715e163a40bc8ef8ec7e8d4e5d08 about one week ago. Change-Id: I042989c2b7b379284b2ee5fea3bd8f8ce406b09e --- M src/hnbgw_vty.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/93/5593/1 diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index 2c47bba..859cd31 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -153,7 +153,7 @@ vty_out(vty, "(no addr)"); return; } - vty_out(vty, name); + vty_out(vty, "%s", name); talloc_free(name); } -- To view, visit https://gerrit.osmocom.org/5593 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I042989c2b7b379284b2ee5fea3bd8f8ce406b09e Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte
[PATCH] osmo-iuh[master]: hnbgw_vty.c: cosmetic: Fix non-tab-indented code
Review at https://gerrit.osmocom.org/5592 hnbgw_vty.c: cosmetic: Fix non-tab-indented code This was introduced a week ago in Change-Id I3c937306a011715e163a40bc8ef8ec7e8d4e5d08 and is now cleaned up. Change-Id: Iaadf941aa7f1c5ae05eb02b51cc646b7b5587ba3 --- M src/hnbgw_vty.c 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/92/5592/1 diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index 060319b..2c47bba 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -147,14 +147,14 @@ static void vty_out_ofd_addr(struct vty *vty, struct osmo_fd *ofd) { -char *name; -if (!ofd || ofd->fd < 0 + char *name; + if (!ofd || ofd->fd < 0 || !(name = osmo_sock_get_name(vty, ofd->fd))) { vty_out(vty, "(no addr)"); return; -} -vty_out(vty, name); -talloc_free(name); + } + vty_out(vty, name); + talloc_free(name); } static void vty_dump_hnb_info__map_states(struct vty *vty, const char *name, unsigned int count, -- To view, visit https://gerrit.osmocom.org/5592 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaadf941aa7f1c5ae05eb02b51cc646b7b5587ba3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte
Build failure of network:osmocom:nightly/osmo-iuh in Debian_9.0/aarch64
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_9.0/aarch64 Package network:osmocom:nightly/osmo-iuh failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 1010s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 1010s] make[5]: *** [hnbgw_vty.o] Error 1 [ 1010s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 1010s] Makefile:639: recipe for target 'all-recursive' failed [ 1010s] make[4]: *** [all-recursive] Error 1 [ 1010s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 1010s] Makefile:451: recipe for target 'all' failed [ 1010s] make[3]: *** [all] Error 2 [ 1010s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 1010s] Makefile:452: recipe for target 'all-recursive' failed [ 1010s] make[2]: *** [all-recursive] Error 1 [ 1010s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 1010s] Makefile:376: recipe for target 'all' failed [ 1010s] make[1]: *** [all] Error 2 [ 1010s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 1010s] dh_auto_build: make -j1 returned exit code 2 [ 1010s] debian/rules:9: recipe for target 'build' failed [ 1010s] make: *** [build] Error 2 [ 1010s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 1010s] [ 1010s] obs-arm-4 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:31:36 UTC 2017. [ 1010s] [ 1010s] ### VM INTERACTION START ### [ 1013s] [ 999.679824] sysrq: SysRq : Power Off [ 1013s] [ 999.682895] reboot: Power down [ 1013s] ### VM INTERACTION END ### [ 1013s] [ 1013s] obs-arm-4 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:31:39 UTC 2017. [ 1013s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:nightly/osmo-iuh in xUbuntu_16.04/i586
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-iuh failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 538s] cc1: some warnings being treated as errors [ 538s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 538s] make[5]: *** [hnbgw_vty.o] Error 1 [ 538s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 538s] Makefile:639: recipe for target 'all-recursive' failed [ 538s] make[4]: *** [all-recursive] Error 1 [ 538s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 538s] Makefile:451: recipe for target 'all' failed [ 538s] make[3]: *** [all] Error 2 [ 538s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 538s] Makefile:452: recipe for target 'all-recursive' failed [ 538s] make[2]: *** [all-recursive] Error 1 [ 538s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 538s] Makefile:376: recipe for target 'all' failed [ 538s] make[1]: *** [all] Error 2 [ 538s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 538s] dh_auto_build: make -j1 returned exit code 2 [ 538s] debian/rules:9: recipe for target 'build' failed [ 538s] make: *** [build] Error 2 [ 538s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 538s] [ 538s] cloud137 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:14:34 UTC 2017. [ 538s] [ 538s] ### VM INTERACTION START ### [ 541s] [ 529.174556] reboot: Power down [ 542s] ### VM INTERACTION END ### [ 542s] [ 542s] cloud137 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:14:39 UTC 2017. [ 542s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:nightly/osmo-iuh in Debian_9.0/x86_64
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_9.0/x86_64 Package network:osmocom:nightly/osmo-iuh failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 602s] cc1: some warnings being treated as errors [ 602s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 602s] make[5]: *** [hnbgw_vty.o] Error 1 [ 602s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 602s] Makefile:639: recipe for target 'all-recursive' failed [ 602s] make[4]: *** [all-recursive] Error 1 [ 602s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 602s] Makefile:451: recipe for target 'all' failed [ 602s] make[3]: *** [all] Error 2 [ 602s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 602s] Makefile:452: recipe for target 'all-recursive' failed [ 602s] make[2]: *** [all-recursive] Error 1 [ 602s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 602s] Makefile:376: recipe for target 'all' failed [ 602s] make[1]: *** [all] Error 2 [ 602s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 602s] dh_auto_build: make -j1 returned exit code 2 [ 602s] debian/rules:9: recipe for target 'build' failed [ 602s] make: *** [build] Error 2 [ 602s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 602s] [ 602s] lamb13 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:13:17 UTC 2017. [ 602s] [ 602s] ### VM INTERACTION START ### [ 605s] [ 596.299132] reboot: Power down [ 605s] ### VM INTERACTION END ### [ 605s] [ 605s] lamb13 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:13:20 UTC 2017. [ 605s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:nightly/osmo-iuh in Debian_9.0/i586
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_9.0/i586 Package network:osmocom:nightly/osmo-iuh failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 566s] cc1: some warnings being treated as errors [ 566s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 566s] make[5]: *** [hnbgw_vty.o] Error 1 [ 566s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 566s] Makefile:639: recipe for target 'all-recursive' failed [ 566s] make[4]: *** [all-recursive] Error 1 [ 566s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 566s] Makefile:451: recipe for target 'all' failed [ 566s] make[3]: *** [all] Error 2 [ 566s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 566s] Makefile:452: recipe for target 'all-recursive' failed [ 566s] make[2]: *** [all-recursive] Error 1 [ 566s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 566s] Makefile:376: recipe for target 'all' failed [ 566s] make[1]: *** [all] Error 2 [ 566s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 566s] dh_auto_build: make -j1 returned exit code 2 [ 566s] debian/rules:9: recipe for target 'build' failed [ 566s] make: *** [build] Error 2 [ 566s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 566s] [ 566s] cloud105 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:13:27 UTC 2017. [ 566s] [ 566s] ### VM INTERACTION START ### [ 569s] [ 552.397373] reboot: Power down [ 571s] ### VM INTERACTION END ### [ 571s] [ 571s] cloud105 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:13:33 UTC 2017. [ 571s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:nightly/osmo-iuh in xUbuntu_16.10/i586
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/xUbuntu_16.10/i586 Package network:osmocom:nightly/osmo-iuh failed to build in xUbuntu_16.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 530s] cc1: some warnings being treated as errors [ 530s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 530s] make[5]: *** [hnbgw_vty.o] Error 1 [ 530s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 530s] Makefile:639: recipe for target 'all-recursive' failed [ 530s] make[4]: *** [all-recursive] Error 1 [ 530s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 530s] Makefile:451: recipe for target 'all' failed [ 530s] make[3]: *** [all] Error 2 [ 530s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 530s] Makefile:452: recipe for target 'all-recursive' failed [ 530s] make[2]: *** [all-recursive] Error 1 [ 530s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 530s] Makefile:376: recipe for target 'all' failed [ 530s] make[1]: *** [all] Error 2 [ 530s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 530s] dh_auto_build: make -j1 returned exit code 2 [ 530s] debian/rules:9: recipe for target 'build' failed [ 530s] make: *** [build] Error 2 [ 530s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 530s] [ 530s] cloud115 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:13:57 UTC 2017. [ 530s] [ 530s] ### VM INTERACTION START ### [ 534s] [ 516.785588] reboot: Power down [ 535s] ### VM INTERACTION END ### [ 535s] [ 535s] cloud115 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:14:03 UTC 2017. [ 535s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:nightly/osmo-iuh in xUbuntu_17.10/x86_64
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/xUbuntu_17.10/x86_64 Package network:osmocom:nightly/osmo-iuh failed to build in xUbuntu_17.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 534s] cc1: some warnings being treated as errors [ 534s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 534s] make[5]: *** [hnbgw_vty.o] Error 1 [ 534s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 534s] Makefile:639: recipe for target 'all-recursive' failed [ 534s] make[4]: *** [all-recursive] Error 1 [ 534s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 534s] Makefile:451: recipe for target 'all' failed [ 534s] make[3]: *** [all] Error 2 [ 534s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 534s] Makefile:452: recipe for target 'all-recursive' failed [ 534s] make[2]: *** [all-recursive] Error 1 [ 534s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 534s] Makefile:376: recipe for target 'all' failed [ 534s] make[1]: *** [all] Error 2 [ 534s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 534s] dh_auto_build: make -j1 returned exit code 2 [ 534s] debian/rules:9: recipe for target 'build' failed [ 534s] make: *** [build] Error 2 [ 534s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 534s] [ 534s] cloud107 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:12:38 UTC 2017. [ 534s] [ 534s] ### VM INTERACTION START ### [ 537s] [ 515.542511] reboot: Power down [ 539s] ### VM INTERACTION END ### [ 539s] [ 539s] cloud107 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:12:43 UTC 2017. [ 539s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:nightly/osmo-iuh in xUbuntu_17.04/x86_64
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/xUbuntu_17.04/x86_64 Package network:osmocom:nightly/osmo-iuh failed to build in xUbuntu_17.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 564s] cc1: some warnings being treated as errors [ 564s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 564s] make[5]: *** [hnbgw_vty.o] Error 1 [ 564s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 564s] Makefile:639: recipe for target 'all-recursive' failed [ 564s] make[4]: *** [all-recursive] Error 1 [ 564s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 564s] Makefile:451: recipe for target 'all' failed [ 564s] make[3]: *** [all] Error 2 [ 564s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 564s] Makefile:452: recipe for target 'all-recursive' failed [ 564s] make[2]: *** [all-recursive] Error 1 [ 564s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 564s] Makefile:376: recipe for target 'all' failed [ 564s] make[1]: *** [all] Error 2 [ 564s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 564s] dh_auto_build: make -j1 returned exit code 2 [ 564s] debian/rules:9: recipe for target 'build' failed [ 564s] make: *** [build] Error 2 [ 564s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 564s] [ 564s] lamb07 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:12:31 UTC 2017. [ 564s] [ 564s] ### VM INTERACTION START ### [ 567s] [ 559.595984] sysrq: SysRq : [ 559.602167] reboot: Power down [ 567s] ### VM INTERACTION END ### [ 567s] [ 567s] lamb07 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:12:34 UTC 2017. [ 567s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:nightly/osmo-iuh in xUbuntu_16.10/x86_64
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/xUbuntu_16.10/x86_64 Package network:osmocom:nightly/osmo-iuh failed to build in xUbuntu_16.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 520s] cc1: some warnings being treated as errors [ 520s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 520s] make[5]: *** [hnbgw_vty.o] Error 1 [ 520s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 520s] Makefile:639: recipe for target 'all-recursive' failed [ 520s] make[4]: *** [all-recursive] Error 1 [ 520s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 520s] Makefile:451: recipe for target 'all' failed [ 520s] make[3]: *** [all] Error 2 [ 520s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 520s] Makefile:452: recipe for target 'all-recursive' failed [ 520s] make[2]: *** [all-recursive] Error 1 [ 520s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 520s] Makefile:376: recipe for target 'all' failed [ 520s] make[1]: *** [all] Error 2 [ 520s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 520s] dh_auto_build: make -j1 returned exit code 2 [ 520s] debian/rules:9: recipe for target 'build' failed [ 520s] make: *** [build] Error 2 [ 520s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 520s] [ 520s] lamb75 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:12:44 UTC 2017. [ 520s] [ 520s] ### VM INTERACTION START ### [ 523s] [ 516.070402] reboot: Power down [ 523s] ### VM INTERACTION END ### [ 523s] [ 523s] lamb75 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:12:48 UTC 2017. [ 523s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:nightly/osmo-iuh in xUbuntu_16.04/x86_64
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-iuh failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 555s] cc1: some warnings being treated as errors [ 555s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 555s] make[5]: *** [hnbgw_vty.o] Error 1 [ 555s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 555s] Makefile:639: recipe for target 'all-recursive' failed [ 555s] make[4]: *** [all-recursive] Error 1 [ 555s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 555s] Makefile:451: recipe for target 'all' failed [ 555s] make[3]: *** [all] Error 2 [ 555s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 555s] Makefile:452: recipe for target 'all-recursive' failed [ 555s] make[2]: *** [all-recursive] Error 1 [ 555s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 555s] Makefile:376: recipe for target 'all' failed [ 555s] make[1]: *** [all] Error 2 [ 555s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 555s] dh_auto_build: make -j1 returned exit code 2 [ 555s] debian/rules:9: recipe for target 'build' failed [ 555s] make: *** [build] Error 2 [ 555s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 555s] [ 555s] build32 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:11:42 UTC 2017. [ 555s] [ 555s] ### VM INTERACTION START ### [ 558s] [ 549.650254] reboot: Power down [ 559s] ### VM INTERACTION END ### [ 559s] [ 559s] build32 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:11:46 UTC 2017. [ 559s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:nightly/osmo-iuh in xUbuntu_17.04/i586
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/xUbuntu_17.04/i586 Package network:osmocom:nightly/osmo-iuh failed to build in xUbuntu_17.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 581s] cc1: some warnings being treated as errors [ 581s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 581s] make[5]: *** [hnbgw_vty.o] Error 1 [ 581s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 581s] Makefile:639: recipe for target 'all-recursive' failed [ 581s] make[4]: *** [all-recursive] Error 1 [ 581s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 581s] Makefile:451: recipe for target 'all' failed [ 581s] make[3]: *** [all] Error 2 [ 581s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 581s] Makefile:452: recipe for target 'all-recursive' failed [ 581s] make[2]: *** [all-recursive] Error 1 [ 581s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 581s] Makefile:376: recipe for target 'all' failed [ 581s] make[1]: *** [all] Error 2 [ 581s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 581s] dh_auto_build: make -j1 returned exit code 2 [ 581s] debian/rules:9: recipe for target 'build' failed [ 581s] make: *** [build] Error 2 [ 581s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 581s] [ 581s] lamb19 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:11:12 UTC 2017. [ 581s] [ 581s] ### VM INTERACTION START ### [ 584s] [ 576.011197] reboot: Power down [ 584s] ### VM INTERACTION END ### [ 584s] [ 584s] lamb19 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:11:15 UTC 2017. [ 584s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:nightly/osmo-iuh in Debian_8.0/i586
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_8.0/i586 Package network:osmocom:nightly/osmo-iuh failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 271s] Makefile:599: recipe for target 'hnbgw_vty.o' failed [ 271s] make[5]: *** [hnbgw_vty.o] Error 1 [ 271s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 271s] Makefile:628: recipe for target 'all-recursive' failed [ 271s] make[4]: *** [all-recursive] Error 1 [ 271s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 271s] Makefile:439: recipe for target 'all' failed [ 271s] make[3]: *** [all] Error 2 [ 271s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 271s] Makefile:440: recipe for target 'all-recursive' failed [ 271s] make[2]: *** [all-recursive] Error 1 [ 271s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 271s] Makefile:363: recipe for target 'all' failed [ 271s] make[1]: *** [all] Error 2 [ 271s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 271s] dh_auto_build: make -j1 returned exit code 2 [ 271s] debian/rules:9: recipe for target 'build' failed [ 271s] make: *** [build] Error 2 [ 271s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 271s] [ 271s] lamb14 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:09:01 UTC 2017. [ 271s] [ 271s] ### VM INTERACTION START ### [ 272s] Powering off. [ 272s] [ 264.338378] reboot: Power down [ 272s] ### VM INTERACTION END ### [ 272s] [ 272s] lamb14 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:09:03 UTC 2017. [ 272s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:nightly/osmo-iuh in Debian_8.0/x86_64
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-iuh failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 260s] Makefile:599: recipe for target 'hnbgw_vty.o' failed [ 260s] make[5]: *** [hnbgw_vty.o] Error 1 [ 260s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 260s] Makefile:628: recipe for target 'all-recursive' failed [ 260s] make[4]: *** [all-recursive] Error 1 [ 260s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 260s] Makefile:439: recipe for target 'all' failed [ 260s] make[3]: *** [all] Error 2 [ 260s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 260s] Makefile:440: recipe for target 'all-recursive' failed [ 260s] make[2]: *** [all-recursive] Error 1 [ 260s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 260s] Makefile:363: recipe for target 'all' failed [ 260s] make[1]: *** [all] Error 2 [ 260s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 260s] dh_auto_build: make -j1 returned exit code 2 [ 260s] debian/rules:9: recipe for target 'build' failed [ 260s] make: *** [build] Error 2 [ 260s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 260s] [ 260s] lamb64 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:08:11 UTC 2017. [ 260s] [ 260s] ### VM INTERACTION START ### [ 261s] Powering off. [ 261s] [ 253.231873] reboot: Power down [ 261s] ### VM INTERACTION END ### [ 261s] [ 261s] lamb64 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:08:13 UTC 2017. [ 261s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
[PATCH] osmo-iuh[master]: Add control interface
Review at https://gerrit.osmocom.org/5591 Add control interface * add libosmoctrl dependency * bind control interface Change-Id: I4637e88da00bac1ab0237c29ac73806d024863ba --- M configure.ac M include/osmocom/iuh/hnbgw.h M src/Makefile.am M src/hnbgw.c 4 files changed, 15 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/91/5591/1 diff --git a/configure.ac b/configure.ac index 4c5f47f..2b8974f 100644 --- a/configure.ac +++ b/configure.ac @@ -36,6 +36,7 @@ PKG_CHECK_MODULES(OSMOCORE, libosmocore >= 0.10.0) PKG_CHECK_MODULES(OSMOGSM, libosmogsm >= 0.10.0) PKG_CHECK_MODULES(OSMOVTY, libosmovty >= 0.10.0) +PKG_CHECK_MODULES(OSMOCTRL, libosmoctrl) PKG_CHECK_MODULES(OSMONETIF, libosmo-netif >= 0.1.0) PKG_CHECK_MODULES(OSMOSIGTRAN, libosmo-sigtran >= 0.8.0) PKG_CHECK_MODULES(ASN1C, libasn1c >= 0.9.28) diff --git a/include/osmocom/iuh/hnbgw.h b/include/osmocom/iuh/hnbgw.h index 58bdab4..f3970b0 100644 --- a/include/osmocom/iuh/hnbgw.h +++ b/include/osmocom/iuh/hnbgw.h @@ -120,6 +120,7 @@ const char *iups_remote_addr_name; uint16_t rnc_id; bool hnbap_allow_tmsi; + struct ctrl_handle *ctrl; } config; /*! SCTP listen socket for incoming connections */ struct osmo_stream_srv_link *iuh; diff --git a/src/Makefile.am b/src/Makefile.am index 85bfad6..2e57a8e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -43,7 +43,7 @@ ranap_decoder.c ranap_encoder.c: gen_ranap.stamp AM_CFLAGS = -Wall -I$(top_srcdir)/include -I$(top_builddir)/include \ - $(OSMOCORE_CFLAGS) $(OSMOVTY_CFLAGS) $(OSMOGSM_CFLAGS) \ + $(OSMOCORE_CFLAGS) $(OSMOVTY_CFLAGS) $(OSMOCTRL_CFLAGS) $(OSMOGSM_CFLAGS) \ $(OSMONETIF_CFLAGS) $(ASN1C_CFLAGS) $(OSMOSIGTRAN_CFLAGS) # build the shared RANAP library @@ -67,7 +67,7 @@ hnbgw_vty.c \ context_map.c hnbgw_cn.c -osmo_hnbgw_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOVTY_LIBS) \ +osmo_hnbgw_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOVTY_LIBS) $(OSMOCTRL_LIBS) \ $(ASN1C_LIBS) $(OSMOSIGTRAN_LIBS) \ $(OSMONETIF_LIBS) \ hnbap/libosmo-asn1-hnbap.a rua/libosmo-asn1-rua.a \ diff --git a/src/hnbgw.c b/src/hnbgw.c index 752fc0f..7e501fa 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -41,7 +41,10 @@ #include #include #include - +#include +#include +#include +#include #include #include #include @@ -477,6 +480,13 @@ exit(1); } + g_hnb_gw->config.ctrl = ctrl_interface_setup_dynip(NULL, ctrl_vty_get_bind_addr(), OSMO_CTRL_PORT_HNBGW, NULL); + if (!g_hnb_gw->config.ctrl) { + LOGP(DMAIN, LOGL_ERROR, "Failed to create CTRL interface on %s:%u\n", +ctrl_vty_get_bind_addr(), OSMO_CTRL_PORT_HNBGW); + exit(1); + } + ranap_set_log_area(DRANAP); rc = hnbgw_cnlink_init(g_hnb_gw, "127.0.0.1", M3UA_PORT, NULL); -- To view, visit https://gerrit.osmocom.org/5591 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4637e88da00bac1ab0237c29ac73806d024863ba Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Max