summaryrefslogtreecommitdiff
path: root/src/irmd/apn_table.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irmd/apn_table.c')
-rw-r--r--src/irmd/apn_table.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/irmd/apn_table.c b/src/irmd/apn_table.c
index 31c45a78..a7cf0fd3 100644
--- a/src/irmd/apn_table.c
+++ b/src/irmd/apn_table.c
@@ -162,3 +162,20 @@ struct apn_entry * apn_table_get(struct list_head * apn_table, char * ap)
return NULL;
}
+
+struct apn_entry * apn_table_get_by_apn(struct list_head * apn_table,
+ char * apn)
+{
+ struct list_head * p;
+
+ if (apn_table == NULL || apn == NULL)
+ return NULL;
+
+ list_for_each(p, apn_table) {
+ struct apn_entry * e = list_entry(p, struct apn_entry, next);
+ if (!strcmp(e->apn, apn))
+ return e;
+ }
+
+ return NULL;
+}