[asterisk-commits] rizzo: trunk r126448 - /trunk/channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Jun 29 13:50:20 CDT 2008


Author: rizzo
Date: Sun Jun 29 13:50:20 2008
New Revision: 126448

URL: http://svn.digium.com/view/asterisk?view=rev&rev=126448
Log:
fix wrong argument in checking boundaries for a rectangle

some whitespace fixes

Modified:
    trunk/channels/console_board.c
    trunk/channels/console_gui.c
    trunk/channels/console_video.h

Modified: trunk/channels/console_board.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/console_board.c?view=diff&rev=126448&r1=126447&r2=126448
==============================================================================
--- trunk/channels/console_board.c (original)
+++ trunk/channels/console_board.c Sun Jun 29 13:50:20 2008
@@ -148,7 +148,7 @@
 	b->cur_col = 0;		/* current print column */
 	b->cur_line = 0;	/* last line displayed */
 
-	ast_log(LOG_WARNING, "Message board %dx%d@%d,%d successfully initialized\n",
+	if (0) ast_log(LOG_WARNING, "Message board %dx%d@%d,%d successfully initialized\n",
 		b->p_rect->w, b->p_rect->h,
 		b->p_rect->x, b->p_rect->y);
 	return b;

Modified: trunk/channels/console_gui.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/console_gui.c?view=diff&rev=126448&r1=126447&r2=126448
==============================================================================
--- trunk/channels/console_gui.c (original)
+++ trunk/channels/console_gui.c Sun Jun 29 13:50:20 2008
@@ -75,7 +75,7 @@
 /* our representation of a displayed window. SDL can only do one main
  * window so we map everything within that one
  */
-struct display_window   {   
+struct display_window {   
 	SDL_Overlay	*bmp;
 	SDL_Rect	rect;	/* location of the window */
 };
@@ -444,6 +444,7 @@
 
 	case KEY_DIGIT_BACKGROUND:
 		break;
+
 	default:
 		ast_log(LOG_WARNING, "function not yet defined %i\n", index);
 	}
@@ -1027,7 +1028,7 @@
 		xp = ((x - e->x0)*dx + (y - e->y0)*dy)/l;
 		yp = (-(x - e->x0)*dy + (y - e->y0)*dx)/l;
 		if (e->type == KP_RECT) {
-			ret = (xp >= 0 && xp < l && yp >=0 && yp < l);
+			ret = (xp >= 0 && xp < l && yp >=0 && yp < e->h);
 		} else if (e->type == KP_CIRCLE) {
 			dx = xp*xp/(l*l) + yp*yp/(e->h*e->h);
 			ret = (dx < 1);

Modified: trunk/channels/console_video.h
URL: http://svn.digium.com/view/asterisk/trunk/channels/console_video.h?view=diff&rev=126448&r1=126447&r2=126448
==============================================================================
--- trunk/channels/console_video.h (original)
+++ trunk/channels/console_video.h Sun Jun 29 13:50:20 2008
@@ -138,6 +138,5 @@
 
 /*! \brief deallocates memory space for a board */
 void delete_board(struct board *b);
-
 #endif /* CONSOLE_VIDEO_H */
 /* end of file */




More information about the asterisk-commits mailing list