[svn-commits] murf: branch 1.4 r47344 - /branches/1.4/channels/chan_skinny.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Wed Nov 8 15:54:56 MST 2006


Author: murf
Date: Wed Nov  8 16:54:56 2006
New Revision: 47344

URL: http://svn.digium.com/view/asterisk?rev=47344&view=rev
Log:
Committed in behalf of 8190.

Modified:
    branches/1.4/channels/chan_skinny.c

Modified: branches/1.4/channels/chan_skinny.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_skinny.c?rev=47344&r1=47343&r2=47344&view=diff
==============================================================================
--- branches/1.4/channels/chan_skinny.c (original)
+++ branches/1.4/channels/chan_skinny.c Wed Nov  8 16:54:56 2006
@@ -420,7 +420,10 @@
 	char text[40];
 };
 
+#define CLEAR_NOTIFY_MESSAGE  0x0115
+#define CLEAR_PROMPT_MESSAGE  0x0113
 #define CLEAR_DISPLAY_MESSAGE 0x009A
+
 #define CAPABILITIES_REQ_MESSAGE 0x009B
 
 #define REGISTER_REJ_MESSAGE 0x009D
@@ -4252,7 +4255,10 @@
 		}
 	}
 	ast_log(LOG_NOTICE, "Skinny Session returned: %s\n", strerror(errno));
-	destroy_session(s);
+
+	if (s) 
+		destroy_session(s);
+	
 	return 0;
 }
 
@@ -4359,17 +4365,19 @@
 static struct ast_channel *skinny_request(const char *type, int format, void *data, int *cause)
 {
 	int oldformat;
+	
 	struct skinny_line *l;
 	struct ast_channel *tmpc = NULL;
 	char tmp[256];
 	char *dest = data;
 
 	oldformat = format;
-	format &= default_capability;
-	if (!format) {
+	
+	if (!(format &= ((AST_FORMAT_MAX_AUDIO << 1) - 1))) {
 		ast_log(LOG_NOTICE, "Asked to get a channel of unsupported format '%d'\n", format);
-		return NULL;
-	}
+		return NULL;	
+	}		
+
 	ast_copy_string(tmp, dest, sizeof(tmp));
 	if (ast_strlen_zero(tmp)) {
 		ast_log(LOG_NOTICE, "Skinny channels require a device\n");



More information about the svn-commits mailing list