Commit 956fd47ed60bda6e27ad8bb9f53ba5215973300a
1 parent
0d6a8d90
修复返回值低级错误
Showing
1 changed file
with
30 additions
and
30 deletions
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
| ... | ... | @@ -45,8 +45,8 @@ public class ZLMHttpHookListener { |
| 45 | 45 | |
| 46 | 46 | |
| 47 | 47 | JSONObject ret = new JSONObject(); |
| 48 | - json.put("code", 0); | |
| 49 | - json.put("msg", "success"); | |
| 48 | + ret.put("code", 0); | |
| 49 | + ret.put("msg", "success"); | |
| 50 | 50 | return new ResponseEntity<String>(ret.toString(),HttpStatus.OK); |
| 51 | 51 | } |
| 52 | 52 | |
| ... | ... | @@ -64,10 +64,10 @@ public class ZLMHttpHookListener { |
| 64 | 64 | // TODO Auto-generated method stub |
| 65 | 65 | |
| 66 | 66 | JSONObject ret = new JSONObject(); |
| 67 | - json.put("code", 0); | |
| 68 | - json.put("err", ""); | |
| 69 | - json.put("path", ""); | |
| 70 | - json.put("second", 600); | |
| 67 | + ret.put("code", 0); | |
| 68 | + ret.put("err", ""); | |
| 69 | + ret.put("path", ""); | |
| 70 | + ret.put("second", 600); | |
| 71 | 71 | return new ResponseEntity<String>(ret.toString(),HttpStatus.OK); |
| 72 | 72 | } |
| 73 | 73 | |
| ... | ... | @@ -85,8 +85,8 @@ public class ZLMHttpHookListener { |
| 85 | 85 | // TODO Auto-generated method stub |
| 86 | 86 | |
| 87 | 87 | JSONObject ret = new JSONObject(); |
| 88 | - json.put("code", 0); | |
| 89 | - json.put("msg", "success"); | |
| 88 | + ret.put("code", 0); | |
| 89 | + ret.put("msg", "success"); | |
| 90 | 90 | return new ResponseEntity<String>(ret.toString(),HttpStatus.OK); |
| 91 | 91 | } |
| 92 | 92 | |
| ... | ... | @@ -104,11 +104,11 @@ public class ZLMHttpHookListener { |
| 104 | 104 | // TODO Auto-generated method stub |
| 105 | 105 | |
| 106 | 106 | JSONObject ret = new JSONObject(); |
| 107 | - json.put("code", 0); | |
| 108 | - json.put("msg", "success"); | |
| 109 | - json.put("enableHls", true); | |
| 110 | - json.put("enableMP4", false); | |
| 111 | - json.put("enableRtxp", true); | |
| 107 | + ret.put("code", 0); | |
| 108 | + ret.put("msg", "success"); | |
| 109 | + ret.put("enableHls", true); | |
| 110 | + ret.put("enableMP4", false); | |
| 111 | + ret.put("enableRtxp", true); | |
| 112 | 112 | return new ResponseEntity<String>(ret.toString(),HttpStatus.OK); |
| 113 | 113 | } |
| 114 | 114 | |
| ... | ... | @@ -126,8 +126,8 @@ public class ZLMHttpHookListener { |
| 126 | 126 | // TODO Auto-generated method stub |
| 127 | 127 | |
| 128 | 128 | JSONObject ret = new JSONObject(); |
| 129 | - json.put("code", 0); | |
| 130 | - json.put("msg", "success"); | |
| 129 | + ret.put("code", 0); | |
| 130 | + ret.put("msg", "success"); | |
| 131 | 131 | return new ResponseEntity<String>(ret.toString(),HttpStatus.OK); |
| 132 | 132 | } |
| 133 | 133 | |
| ... | ... | @@ -145,8 +145,8 @@ public class ZLMHttpHookListener { |
| 145 | 145 | // TODO Auto-generated method stub |
| 146 | 146 | |
| 147 | 147 | JSONObject ret = new JSONObject(); |
| 148 | - json.put("code", 0); | |
| 149 | - json.put("realm", ""); | |
| 148 | + ret.put("code", 0); | |
| 149 | + ret.put("realm", ""); | |
| 150 | 150 | return new ResponseEntity<String>(ret.toString(),HttpStatus.OK); |
| 151 | 151 | } |
| 152 | 152 | |
| ... | ... | @@ -165,9 +165,9 @@ public class ZLMHttpHookListener { |
| 165 | 165 | // TODO Auto-generated method stub |
| 166 | 166 | |
| 167 | 167 | JSONObject ret = new JSONObject(); |
| 168 | - json.put("code", 0); | |
| 169 | - json.put("encrypted", false); | |
| 170 | - json.put("passwd", "test"); | |
| 168 | + ret.put("code", 0); | |
| 169 | + ret.put("encrypted", false); | |
| 170 | + ret.put("passwd", "test"); | |
| 171 | 171 | return new ResponseEntity<String>(ret.toString(),HttpStatus.OK); |
| 172 | 172 | } |
| 173 | 173 | |
| ... | ... | @@ -185,8 +185,8 @@ public class ZLMHttpHookListener { |
| 185 | 185 | // TODO Auto-generated method stub |
| 186 | 186 | |
| 187 | 187 | JSONObject ret = new JSONObject(); |
| 188 | - json.put("code", 0); | |
| 189 | - json.put("msg", "success"); | |
| 188 | + ret.put("code", 0); | |
| 189 | + ret.put("msg", "success"); | |
| 190 | 190 | return new ResponseEntity<String>(ret.toString(),HttpStatus.OK); |
| 191 | 191 | } |
| 192 | 192 | |
| ... | ... | @@ -204,8 +204,8 @@ public class ZLMHttpHookListener { |
| 204 | 204 | // TODO Auto-generated method stub |
| 205 | 205 | |
| 206 | 206 | JSONObject ret = new JSONObject(); |
| 207 | - json.put("code", 0); | |
| 208 | - json.put("msg", "success"); | |
| 207 | + ret.put("code", 0); | |
| 208 | + ret.put("msg", "success"); | |
| 209 | 209 | return new ResponseEntity<String>(ret.toString(),HttpStatus.OK); |
| 210 | 210 | } |
| 211 | 211 | |
| ... | ... | @@ -228,8 +228,8 @@ public class ZLMHttpHookListener { |
| 228 | 228 | cmder.streamByeCmd(ssrc); |
| 229 | 229 | |
| 230 | 230 | JSONObject ret = new JSONObject(); |
| 231 | - json.put("code", 0); | |
| 232 | - json.put("close", true); | |
| 231 | + ret.put("code", 0); | |
| 232 | + ret.put("close", true); | |
| 233 | 233 | return new ResponseEntity<String>(ret.toString(),HttpStatus.OK); |
| 234 | 234 | } |
| 235 | 235 | |
| ... | ... | @@ -247,8 +247,8 @@ public class ZLMHttpHookListener { |
| 247 | 247 | // TODO Auto-generated method stub |
| 248 | 248 | |
| 249 | 249 | JSONObject ret = new JSONObject(); |
| 250 | - json.put("code", 0); | |
| 251 | - json.put("msg", "success"); | |
| 250 | + ret.put("code", 0); | |
| 251 | + ret.put("msg", "success"); | |
| 252 | 252 | return new ResponseEntity<String>(ret.toString(),HttpStatus.OK); |
| 253 | 253 | } |
| 254 | 254 | |
| ... | ... | @@ -266,8 +266,8 @@ public class ZLMHttpHookListener { |
| 266 | 266 | // TODO Auto-generated method stub |
| 267 | 267 | |
| 268 | 268 | JSONObject ret = new JSONObject(); |
| 269 | - json.put("code", 0); | |
| 270 | - json.put("msg", "success"); | |
| 269 | + ret.put("code", 0); | |
| 270 | + ret.put("msg", "success"); | |
| 271 | 271 | return new ResponseEntity<String>(ret.toString(),HttpStatus.OK); |
| 272 | 272 | } |
| 273 | 273 | } | ... | ... |