diff options
| author | Anton <anton@picapica.im> | 2026-08-19 14:47:51 +0400 |
|---|---|---|
| committer | Anton <anton@picapica.im> | 2026-08-19 14:47:51 +0400 |
| commit | c9f6051380f4edf5f7ac336501ecb1f32946dc6e (patch) | |
| tree | 4a16463532ccbe03ba823b277ba7a0ee4567f38e /PICA_netconf.c | |
| parent | 60c17c433759d282663497704998d81bab800668 (diff) | |
| download | pica-pica-c9f6051380f4edf5f7ac336501ecb1f32946dc6e.tar.gz pica-pica-c9f6051380f4edf5f7ac336501ecb1f32946dc6e.zip | |
pica-client: UDP transport for calls
Diffstat (limited to 'PICA_netconf.c')
| -rw-r--r-- | PICA_netconf.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/PICA_netconf.c b/PICA_netconf.c index 03c12ff..d319633 100644 --- a/PICA_netconf.c +++ b/PICA_netconf.c @@ -173,6 +173,16 @@ int PICA_upnp_autoconfigure_ipv4(int public_port, int local_port, char *public_i else ret = 1; + /* The port with the same number carries call media over UDP, see + * PICA_media.h. Failing to map it only costs calls their UDP transport, + * so it does not change the result reported for the TCP mapping. + */ + if (UPNPCOMMAND_SUCCESS != UPNP_AddPortMapping(urls.controlURL, data.first.servicetype, + ppstr, lpstr, lanaddr, "Pica Pica media", "UDP", 0, "0")) + { + fprintf(stderr, "failed to forward UDP port %s for call media\n", ppstr); + } + freeUPNPDevlist(devlist); FreeUPNPUrls(&urls); return ret; |
