Project

General

Profile

0001-VTY-Allow-logging-filter-imsi-statements-for-IMSIs-w.patch

daniel, 10/09/2018 09:55 PM

View differences:

src/osmo-bsc/osmo_bsc_vty.c
891 891
	struct log_target *tgt = osmo_log_vty2tgt(vty);
892 892
	const char *imsi = argv[0];
893 893

  
894
	bsc_subscr = bsc_subscr_find_by_imsi(bsc_gsmnet->bsc_subscribers, imsi);
894
	bsc_subscr = bsc_subscr_find_or_create_by_imsi(bsc_gsmnet->bsc_subscribers, imsi);
895 895

  
896 896
	if (!bsc_subscr) {
897
		vty_out(vty, "%%no subscriber with IMSI(%s)%s",
897
		vty_out(vty, "%%failed to enable logging for subscriber with IMSI(%s)%s",
898 898
			imsi, VTY_NEWLINE);
899 899
		return CMD_WARNING;
900 900
	}
901 901

  
902 902
	log_set_filter_bsc_subscr(tgt, bsc_subscr);
903
	/* log_set_filter has grabbed its own reference  */
904
	bsc_subscr_put(tgt);
905

  
903 906
	return CMD_SUCCESS;
904 907
}
905 908

  
906
- 
Add picture from clipboard (Maximum size: 48.8 MB)