From: <jpg...@us...> - 2008-04-23 15:33:29
|
Revision: 1421 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1421&view=rev Author: jpgrayson Date: 2008-04-23 08:33:35 -0700 (Wed, 23 Apr 2008) Log Message: ----------- Add preprocessor definition IAX_FLAG_VIDEO and use it. Use IAX_FLAG_FULL in an appropriate spot. Modified Paths: -------------- trunk/lib/libiax2/src/iax.c trunk/lib/libiax2/src/iax2.h Modified: trunk/lib/libiax2/src/iax.c =================================================================== --- trunk/lib/libiax2/src/iax.c 2008-04-23 15:22:48 UTC (rev 1420) +++ trunk/lib/libiax2/src/iax.c 2008-04-23 15:33:35 UTC (rev 1421) @@ -1229,7 +1229,7 @@ fr->iseqno = -1; vh = (struct ast_iax2_video_hdr *)(((char* )fr->af.data) - sizeof(struct ast_iax2_video_hdr)); vh->zeros = 0; - vh->callno = htons(0x8000 | fr->callno); + vh->callno = htons(IAX_FLAG_FULL | fr->callno); vh->ts = htons((fr->ts & 0x7FFF) | (fr->af.subclass & 0x1 ? 0x8000 : 0)); fr->datalen = fr->af.datalen + sizeof(struct ast_iax2_video_hdr); fr->data = vh; @@ -3243,11 +3243,11 @@ * or an ordinary meta frame, to find out we check * the V flag. */ - if (!(ntohs(vh->callno) & 0x8000)) { + if (!(ntohs(vh->callno) & IAX_FLAG_VIDEO)) { DEBU(G "Meta frame received from %s, but we cannot handle it\n", inet_ntoa(sin->sin_addr)); IAXERROR "Meta frame received from %s, but we cannot handle it\n", - inet_ntoa(sin->sin_addr)); + inet_ntoa(sin->sin_addr)); return NULL; } /* it is a video metaframe, verify its size */ @@ -3255,11 +3255,11 @@ DEBU(G "Short video mini header received from %s\n", inet_ntoa(sin->sin_addr)); IAXERROR "Short video mini header received from %s\n", - inet_ntoa(sin->sin_addr)); + inet_ntoa(sin->sin_addr)); return NULL; } - session = iax_find_session(sin, ntohs(vh->callno) & ~0x8000, 0, 0); + session = iax_find_session(sin, ntohs(vh->callno) & ~IAX_FLAG_VIDEO, 0, 0); if (session) return iax_videoheader_to_event(session, vh, Modified: trunk/lib/libiax2/src/iax2.h =================================================================== --- trunk/lib/libiax2/src/iax2.h 2008-04-23 15:22:48 UTC (rev 1420) +++ trunk/lib/libiax2/src/iax2.h 2008-04-23 15:33:35 UTC (rev 1421) @@ -20,7 +20,7 @@ #define IAX_MAX_CALLS 32768 #define IAX_FLAG_FULL 0x8000 - +#define IAX_FLAG_VIDEO 0x8000 #define IAX_FLAG_RETRANS 0x8000 #define IAX_FLAG_SC_LOG 0x80 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |