Make --with-pjproject-bundled the default for Asterisk 15
[asterisk/asterisk.git] / channels / console_board.c
index fd286f2..e5ff1fc 100644 (file)
  * configuration file).
  */
 
+/*** MODULEINFO
+       <support_level>extended</support_level>
+ ***/
+
 #include "asterisk.h"  /* ast_strdupa */
-ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #include "asterisk/utils.h"    /* ast_strdupa */
 #include "console_video.h"     /* ast_strdupa */
 
@@ -313,6 +316,23 @@ int print_message(struct board *b, const char *s)
        return 1;
 }
 
+/* deletes a board.
+ * we make the free operation on any fields of the board structure allocated
+ * in dynamic memory
+ */
+void delete_board(struct board *b)
+{
+       if (b) {
+               /* deletes the text */
+               if (b->text)
+                       ast_free (b->text);
+               /* deallocates the blank surface */
+               SDL_FreeSurface(b->blank);
+               /* deallocates the board */
+               ast_free(b);
+       }
+}
+
 #if 0
 /*! \brief refresh the screen, and also grab a bunch of events.
  */