[asterisk-commits] jpeeler: trunk r236893 - in /trunk: channels/chan_sip.c main/cli.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Dec 30 14:34:44 CST 2009


Author: jpeeler
Date: Wed Dec 30 14:34:41 2009
New Revision: 236893

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=236893
Log:
Fix compiling with LOW_MEMORY.

Modified handle_verbose to be LOW_MEMORY aware, removed old RTP related code
in chan_sip.

(closes issue #16381)
Reported by: michael_iedema
Patches: 
      ast_complete_source_filename.patch uploaded by michael iedema (license 942)
      modified by me

Modified:
    trunk/channels/chan_sip.c
    trunk/main/cli.c

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=236893&r1=236892&r2=236893
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Dec 30 14:34:41 2009
@@ -2306,14 +2306,6 @@
 /*! \brief A per-thread temporary pvt structure */
 AST_THREADSTORAGE_CUSTOM(ts_temp_pvt, temp_pvt_init, temp_pvt_cleanup);
 
-#ifdef LOW_MEMORY
-static void ts_ast_rtp_destroy(void *);
-
-AST_THREADSTORAGE_CUSTOM(ts_audio_rtp, NULL, ts_ast_rtp_destroy);
-AST_THREADSTORAGE_CUSTOM(ts_video_rtp, NULL, ts_ast_rtp_destroy);
-AST_THREADSTORAGE_CUSTOM(ts_text_rtp, NULL, ts_ast_rtp_destroy);
-#endif
-
 /*! \brief Authentication list for realm authentication
  * \todo Move the sip_auth list to AST_LIST */
 static struct sip_auth *authl = NULL;
@@ -9308,15 +9300,6 @@
 
 	return found;
 }
-
-
-#ifdef LOW_MEMORY
-static void ts_ast_rtp_destroy(void *data)
-{
-    struct ast_rtp *tmp = data;
-    ast_rtp_destroy(tmp);
-}
-#endif
 
 /*! \brief Add header to SIP message */
 static int add_header(struct sip_request *req, const char *var, const char *value)

Modified: trunk/main/cli.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/cli.c?view=diff&rev=236893&r1=236892&r2=236893
==============================================================================
--- trunk/main/cli.c (original)
+++ trunk/main/cli.c Wed Dec 30 14:34:41 2009
@@ -377,10 +377,18 @@
 	case CLI_INIT:
 		e->command = "core set {debug|verbose}";
 		e->usage =
+#if !defined(LOW_MEMORY)
 			"Usage: core set {debug|verbose} [atleast] <level> [filename]\n"
+#else
+			"Usage: core set {debug|verbose} [atleast] <level>\n"
+#endif
 			"       core set {debug|verbose} off\n"
+#if !defined(LOW_MEMORY)
 			"       Sets level of debug or verbose messages to be displayed or \n"
 			"       sets a filename to display debug messages from.\n"
+#else
+			"       Sets level of debug or verbose messages to be displayed.\n"
+#endif
 			"	0 or off means no messages should be displayed.\n"
 			"	Equivalent to -d[d[...]] or -v[v[v...]] on startup\n";
 		return NULL;
@@ -406,8 +414,10 @@
 			} else if (a->n == (22 - numbermatch) && a->pos == 3 && ast_strlen_zero(argv3)) {
 				return ast_strdup("atleast");
 			}
+#if !defined(LOW_MEMORY)
 		} else if (a->pos == 4 || (a->pos == 5 && !strcasecmp(argv3, "atleast"))) {
 			return ast_complete_source_filename(a->pos == 4 ? S_OR(a->argv[4], "") : S_OR(a->argv[5], ""), a->n);
+#endif
 		}
 		return NULL;
 	}




More information about the asterisk-commits mailing list