Revision 58fb2cdc src/path_handlers.c

View differences:

src/path_handlers.c
263 263
	id = mg_uri_field(hm, 1);
264 264

  
265 265
	ps = pstreamer_manager_get_streamer(c->psm, id);
266
	janus_user_id[0] = '\0';
266 267
	info("UPDATE request for source resource %s\n", id);
267 268
	if (ps)
268 269
	{
269 270
		mg_get_http_var(&hm->body, "participant_id", janus_user_id, MAX_JANUS_USERID_LENGTH);
270 271

  
271
		pstreamer_source_touch(c->psm, (struct pstreamer*) ps, atoll(janus_user_id));
272
		if (strlen(janus_user_id) > 0)
273
		{
274
			info("\tFound Participant ID: %s\n", janus_user_id);
275
			pstreamer_source_touch(c->psm, (struct pstreamer*) ps, atoll(janus_user_id));
276
		} else
277
			pstreamer_touch((struct pstreamer*) ps);
278

  
272 279
		info("\tSource instance %s found and touched\n", id);
273 280
		json = pstreamer_to_json(ps);
274 281
		mg_printf(nc, "%s", "HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\r\nContent-type: application/json\r\n\r\n");

Also available in: Unified diff