Author: solomax
Date: Fri Mar 24 09:58:47 2017
New Revision: 1788398
URL: http://svn.apache.org/viewvc?rev=1788398&view=rev
Log:
no jira: couple NPEs are fixed
Modified:
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/RecordingService.java
openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/basic/Configuration.java
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/RecordingService.java
openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/basic/Configuration.java
Modified:
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/RecordingService.java
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/RecordingService.java?rev=1788398&r1=1788397&r2=1788398&view=diff
==============================================================================
---
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/RecordingService.java
(original)
+++
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/RecordingService.java
Fri Mar 24 09:58:47 2017
@@ -52,6 +52,7 @@ import org.red5.server.api.scope.IScope;
import org.red5.server.api.service.IPendingServiceCall;
import org.red5.server.api.service.IPendingServiceCallback;
import org.red5.server.api.service.IServiceCapableConnection;
+import org.red5.server.api.stream.IBroadcastStream;
import org.red5.server.api.stream.IStreamListener;
import org.red5.server.stream.ClientBroadcastStream;
import org.slf4j.Logger;
@@ -250,22 +251,10 @@ public class RecordingService implements
*/
public void stopRecordingShow(IScope scope, String broadcastId, Long
metaId) {
try {
- if (metaId == null) {
- // this should be fixed, can be useful for
debugging, after all this is an error
- // but we don't want the application to
completely stop the process
- log.error("recordingMetaDataId is null");
- }
-
log.debug("** stopRecordingShow: " + scope);
log.debug("### Stop recording show for broadcastId: " +
broadcastId + " || " + scope.getContextPath());
- Object streamToClose =
scopeApplicationAdapter.getBroadcastStream(scope, broadcastId);
-
- StreamListener listenerAdapter =
streamListeners.get(metaId);
-
- log.debug("Stream Closing :: " + metaId);
-
- ClientBroadcastStream stream = (ClientBroadcastStream)
streamToClose;
+ IBroadcastStream stream =
scopeApplicationAdapter.getBroadcastStream(scope, broadcastId);
// the stream can be null if the user just closes the
browser
// without canceling the recording before leaving
@@ -278,6 +267,16 @@ public class RecordingService implements
}
}
+ if (metaId == null) {
+ // this should be fixed, can be useful for
debugging, after all this is an error
+ // but we don't want the application to
completely stop the process
+ log.error("recordingMetaDataId is null");
+ return;
+ }
+
+ StreamListener listenerAdapter =
streamListeners.get(metaId);
+ log.debug("Stream Closing :: " + metaId);
+
RecordingMetaData metaData = metaDataDao.get(metaId);
BaseConverter.printMetaInfo(metaData, "Stopping the
stream");
// Manually call finish on the stream so that there is
no endless loop waiting in the RecordingConverter waiting for the stream to
finish
Modified:
openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/basic/Configuration.java
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/basic/Configuration.java?rev=1788398&r1=1788397&r2=1788398&view=diff
==============================================================================
---
openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/basic/Configuration.java
(original)
+++
openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/basic/Configuration.java
Fri Mar 24 09:58:47 2017
@@ -41,7 +41,7 @@ import org.simpleframework.xml.Root;
@Entity
@NamedQueries({
- @NamedQuery(name = "forceGetConfigurationByKey", query =
"SELECT c FROM Configuration c "
+ @NamedQuery(name = "forceGetConfigurationByKey", query =
"SELECT c FROM Configuration c "
+ "WHERE c.key LIKE :key"),
@NamedQuery(name = "getConfigurationsByKeys", query = "SELECT c
FROM Configuration c "
+ "WHERE c.key IN :keys and c.deleted = false"),
Modified:
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/RecordingService.java
URL:
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/RecordingService.java?rev=1788398&r1=1788397&r2=1788398&view=diff
==============================================================================
---
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/RecordingService.java
(original)
+++
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/RecordingService.java
Fri Mar 24 09:58:47 2017
@@ -52,6 +52,7 @@ import org.red5.server.api.scope.IScope;
import org.red5.server.api.service.IPendingServiceCall;
import org.red5.server.api.service.IPendingServiceCallback;
import org.red5.server.api.service.IServiceCapableConnection;
+import org.red5.server.api.stream.IBroadcastStream;
import org.red5.server.api.stream.IStreamListener;
import org.red5.server.stream.ClientBroadcastStream;
import org.slf4j.Logger;
@@ -250,22 +251,10 @@ public class RecordingService implements
*/
public void stopRecordingShow(IScope scope, String broadcastId, Long
metaId) {
try {
- if (metaId == null) {
- // this should be fixed, can be useful for
debugging, after all this is an error
- // but we don't want the application to
completely stop the process
- log.error("recordingMetaDataId is null");
- }
-
log.debug("** stopRecordingShow: " + scope);
log.debug("### Stop recording show for broadcastId: " +
broadcastId + " || " + scope.getContextPath());
- Object streamToClose =
scopeApplicationAdapter.getBroadcastStream(scope, broadcastId);
-
- StreamListener listenerAdapter =
streamListeners.get(metaId);
-
- log.debug("Stream Closing :: " + metaId);
-
- ClientBroadcastStream stream = (ClientBroadcastStream)
streamToClose;
+ IBroadcastStream stream =
scopeApplicationAdapter.getBroadcastStream(scope, broadcastId);
// the stream can be null if the user just closes the
browser
// without canceling the recording before leaving
@@ -278,6 +267,16 @@ public class RecordingService implements
}
}
+ if (metaId == null) {
+ // this should be fixed, can be useful for
debugging, after all this is an error
+ // but we don't want the application to
completely stop the process
+ log.error("recordingMetaDataId is null");
+ return;
+ }
+
+ StreamListener listenerAdapter =
streamListeners.get(metaId);
+ log.debug("Stream Closing :: " + metaId);
+
RecordingMetaData metaData = metaDataDao.get(metaId);
BaseConverter.printMetaInfo(metaData, "Stopping the
stream");
// Manually call finish on the stream so that there is
no endless loop waiting in the RecordingConverter waiting for the stream to
finish
Modified:
openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/basic/Configuration.java
URL:
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/basic/Configuration.java?rev=1788398&r1=1788397&r2=1788398&view=diff
==============================================================================
---
openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/basic/Configuration.java
(original)
+++
openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/basic/Configuration.java
Fri Mar 24 09:58:47 2017
@@ -41,7 +41,7 @@ import org.simpleframework.xml.Root;
@Entity
@NamedQueries({
- @NamedQuery(name = "forceGetConfigurationByKey", query =
"SELECT c FROM Configuration c "
+ @NamedQuery(name = "forceGetConfigurationByKey", query =
"SELECT c FROM Configuration c "
+ "WHERE c.key LIKE :key"),
@NamedQuery(name = "getConfigurationsByKeys", query = "SELECT c
FROM Configuration c "
+ "WHERE c.key IN :keys and c.deleted = false"),