add some comments in upf_gtp.c
Related: SYS#5599 Change-Id: I58f86cd84207a74e078ae4758bbed76bb1595d95
This commit is contained in:
parent
0388579be9
commit
77cf6ccf21
|
@ -96,6 +96,8 @@ static int upf_gtp_dev_delete(struct upf_gtp_dev *dev)
|
|||
|
||||
static int upf_gtp_dev_destruct(struct upf_gtp_dev *dev);
|
||||
|
||||
/* Allocate state for one GTP device, add to g_upf->gtp.devs and return the created device. If state for the device of
|
||||
* that name already exists, do nothing and return NULL. */
|
||||
static struct upf_gtp_dev *upf_gtp_dev_alloc(const char *name, const char *local_addr)
|
||||
{
|
||||
struct upf_gtp_dev *dev = upf_gtp_dev_find_by_name(name);
|
||||
|
@ -260,9 +262,11 @@ int upf_gtp_genl_open()
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Already open? */
|
||||
if (g_upf->gtp.nl && g_upf->gtp.genl_id >= 0)
|
||||
return 0;
|
||||
|
||||
/* sanity / paranoia: if re-opening, make sure the previous socket is closed */
|
||||
if (g_upf->gtp.nl)
|
||||
upf_gtp_genl_close();
|
||||
|
||||
|
|
Loading…
Reference in New Issue