aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/cmyth/include/cmyth/cmyth.h2
-rw-r--r--lib/cmyth/libcmyth/proginfo.c12
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/cmyth/include/cmyth/cmyth.h b/lib/cmyth/include/cmyth/cmyth.h
index d8cb364adb..c44078f0db 100644
--- a/lib/cmyth/include/cmyth/cmyth.h
+++ b/lib/cmyth/include/cmyth/cmyth.h
@@ -883,6 +883,8 @@ extern long long cmyth_proginfo_length(cmyth_proginfo_t prog);
*/
extern char *cmyth_proginfo_host(cmyth_proginfo_t prog);
+extern int cmyth_proginfo_port(cmyth_proginfo_t prog);
+
/**
* Determine if two proginfo handles refer to the same program.
* \param a proginfo handle a
diff --git a/lib/cmyth/libcmyth/proginfo.c b/lib/cmyth/libcmyth/proginfo.c
index f6f93474ff..24374aa00e 100644
--- a/lib/cmyth/libcmyth/proginfo.c
+++ b/lib/cmyth/libcmyth/proginfo.c
@@ -1683,6 +1683,18 @@ cmyth_proginfo_host(cmyth_proginfo_t prog)
return ref_hold(prog->proginfo_host);
}
+int
+cmyth_proginfo_port(cmyth_proginfo_t prog)
+{
+ if (!prog) {
+ cmyth_dbg(CMYTH_DBG_ERROR,
+ "%s: no program info\n", __FUNCTION__);
+ return -1;
+ }
+
+ return prog->proginfo_port;
+}
+
long
cmyth_proginfo_card_id(cmyth_proginfo_t prog)
{