Revision d4b242cf

View differences:

plugins/janus_sip.c
1409 1409
				if(!strcmp(type_text, "guest")) {
1410 1410
					JANUS_LOG(LOG_INFO, "Registering as a guest\n");
1411 1411
					guest = TRUE;
1412
					session->account.registration_status = janus_sip_registration_status_registered;
1412 1413
				} else {
1413 1414
					JANUS_LOG(LOG_WARN, "Unknown type '%s', ignoring...\n", type_text);
1414 1415
				}
......
1737 1738
				g_snprintf(error_cause, 512, "Wrong state (register first)");
1738 1739
				goto error;
1739 1740
			}
1741
			if(session->account.registration_status < janus_sip_registration_status_registered) {
1742
				JANUS_LOG(LOG_ERR, "Wrong state (not registered)\n");
1743
				error_code = JANUS_SIP_ERROR_WRONG_STATE;
1744
				g_snprintf(error_cause, 512, "Wrong state (not registered)");
1745
				goto error;
1746
			}
1740 1747
			if(session->status >= janus_sip_call_status_inviting) {
1741 1748
				JANUS_LOG(LOG_ERR, "Wrong state (already in a call? status=%s)\n", janus_sip_call_status_string(session->status));
1742 1749
				error_code = JANUS_SIP_ERROR_WRONG_STATE;

Also available in: Unified diff