gtphub: cosmetic/prepare: add nr_map_refresh().

Sponsored-by: On-Waves ehi
diff --git a/openbsc/src/gprs/gtphub.c b/openbsc/src/gprs/gtphub.c
index 97ccf61..0550c7f 100644
--- a/openbsc/src/gprs/gtphub.c
+++ b/openbsc/src/gprs/gtphub.c
@@ -660,10 +660,16 @@
 	/* Add to the tail to always yield a list sorted by expiry, in
 	 * ascending order. */
 	llist_add_tail(&mapping->entry, &map->mappings);
-	if (map->add_items_to_expiry)
-		expiry_add(map->add_items_to_expiry,
-			   &mapping->expiry_entry,
-			   now);
+	nr_map_refresh(map, mapping, now);
+}
+
+void nr_map_refresh(struct nr_map *map, struct nr_mapping *mapping, time_t now)
+{
+	if (!map->add_items_to_expiry)
+		return;
+	expiry_add(map->add_items_to_expiry,
+		   &mapping->expiry_entry,
+		   now);
 }
 
 void nr_map_clear(struct nr_map *map)
@@ -1010,9 +1016,7 @@
 		    gtphub_port_str(from),
 		    (int)(nrm->orig), (int)(nrm->repl));
 	} else {
-		/* restart expiry timeout */
-		expiry_add(map->add_items_to_expiry, &nrm->expiry_entry,
-			   now);
+		nr_map_refresh(map, nrm, now);
 	}
 
 	OSMO_ASSERT(nrm);