Skip to content

Commit

Permalink
update to latest golang code
Browse files Browse the repository at this point in the history
  • Loading branch information
deleolajide committed Sep 20, 2024
1 parent 880142c commit f9b4e97
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h1>
Broadcast Box Plugin Changelog
</h1>

<p><b>0.0.1</b> -- July 31, 2024</p>
<p><b>0.0.1</b> -- September 31, 2024</p>

<ul>
<li>Initial release. </li>
Expand Down
Binary file modified classes/linux-64/broadcast-box
Binary file not shown.
Binary file modified classes/win-64/broadcast-box.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<artifactId>plugins</artifactId>
<groupId>org.igniterealtime.openfire</groupId>
<version>4.6.0</version>
<version>4.9.0</version>
</parent>

<groupId>org.igniterealtime.openfire</groupId>
Expand Down
14 changes: 6 additions & 8 deletions src/java/org/ifsoft/broadcastbox/openfire/BroadcastBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public class BroadcastBox implements Plugin, PropertyEventListener, ProcessListe
private XProcess broadcastboxThread = null;
private String broadcastboxExePath = null;
private String broadcastboxHomePath = null;
private String broadcastboxRoot = null;
private Path broadcastboxRoot = null;
private ExecutorService executor;
private WebAppContext jspService;
private ServletContextHandler webContext;
Expand Down Expand Up @@ -214,7 +214,6 @@ private void startGoProcesses(File pluginDirectory) {

Engine.environment.put("APP_ENV", "production");
Engine.environment.put("HTTP_ADDRESS", ipaddr + ":" + tcpPort);
Engine.environment.put("INTERFACE_FILTER", ipaddr);
Engine.environment.put("UDP_MUX_PORT_WHEP", udpPort);
Engine.environment.put("UDP_MUX_PORT_WHIP", udpPort);
Engine.environment.put("UDP_MUX_PORT", udpPort);
Expand All @@ -225,7 +224,7 @@ private void startGoProcesses(File pluginDirectory) {
}

Engine.environment.put("STUN_SERVERS", "stun1.l.google.com:19305|stun1.l.google.com:19302|stun4.l.google.com:19302|stun.frozenmountain.com:3478|stun.freeswitch.org:3478");

broadcastboxThread = Spawn.startProcess(broadcastboxExePath, new File(broadcastboxHomePath), this);

webContext = new ServletContextHandler(null, "/", ServletContextHandler.SESSIONS);
Expand All @@ -246,14 +245,13 @@ private void startGoProcesses(File pluginDirectory) {
private void checkNatives(File pluginDirectory) {
try
{
broadcastboxRoot = JiveGlobals.getHomeDirectory() + File.separator + "broadcastbox";
broadcastboxRoot = JiveGlobals.getHomePath().resolve("broadcastbox");

File broadcastboxRootPath = new File(broadcastboxRoot);

if (!broadcastboxRootPath.exists())
if (!Files.exists(broadcastboxRoot))
{
broadcastboxRootPath.mkdirs();
Files.createDirectories(broadcastboxRoot);
}


broadcastboxHomePath = pluginDirectory.getAbsolutePath() + File.separator + "classes";

Expand Down
3 changes: 3 additions & 0 deletions src/root/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
HTTP_ADDRESS=":8080"
ENABLE_HTTP_REDIRECT=
REACT_APP_API_PATH="/api"
3 changes: 3 additions & 0 deletions src/root/.env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
HTTP_ADDRESS=":8080"
ENABLE_HTTP_REDIRECT=
REACT_APP_API_PATH="/api"

0 comments on commit f9b4e97

Please sign in to comment.