[svn-commits] anthonyl: branch anthonyl/sip-publish r44766 - in /team/anthonyl/sip-publish:...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Mon Oct 9 09:47:32 MST 2006


Author: anthonyl
Date: Mon Oct  9 11:47:32 2006
New Revision: 44766

URL: http://svn.digium.com/view/asterisk?rev=44766&view=rev
Log:
testing-tree

Added:
    team/anthonyl/sip-publish/
      - copied from r44765, trunk/
Modified:
    team/anthonyl/sip-publish/channels/chan_local.c
    team/anthonyl/sip-publish/channels/chan_skinny.c

Modified: team/anthonyl/sip-publish/channels/chan_local.c
URL: http://svn.digium.com/view/asterisk/team/anthonyl/sip-publish/channels/chan_local.c?rev=44766&r1=44765&r2=44766&view=diff
==============================================================================
--- team/anthonyl/sip-publish/channels/chan_local.c (original)
+++ team/anthonyl/sip-publish/channels/chan_local.c Mon Oct  9 11:47:32 2006
@@ -294,7 +294,17 @@
 
 static int local_fixup(struct ast_channel *oldchan, struct ast_channel *newchan)
 {
-	struct local_pvt *p = newchan->tech_pvt;
+	struct local_pvt *p;
+	
+	if (!newchan || !newchan->tech_pvt) {
+		if (!newchan)
+			ast_log(LOG_WARNING, "No new channel! Fixup of %s failed.\n", oldchan->name);
+		else
+			ast_log(LOG_WARNING, "No tech_pvt! Fixup of %s failed.\n", oldchan->name);
+		return -1;
+	}
+	
+	p = newchan->tech_pvt;
 	ast_mutex_lock(&p->lock);
 
 	if ((p->owner != oldchan) && (p->chan != oldchan)) {

Modified: team/anthonyl/sip-publish/channels/chan_skinny.c
URL: http://svn.digium.com/view/asterisk/team/anthonyl/sip-publish/channels/chan_skinny.c?rev=44766&r1=44765&r2=44766&view=diff
==============================================================================
--- team/anthonyl/sip-publish/channels/chan_skinny.c (original)
+++ team/anthonyl/sip-publish/channels/chan_skinny.c Mon Oct  9 11:47:32 2006
@@ -732,6 +732,24 @@
    (sizeof(skinny_req) - sizeof(skinny_data)) DOES NOT WORK on all systems (amd64?). */
 int skinny_header_size = 12;
 
+
+
+
+/*******************************
+ *Skinny Message Structure
+ ******************************/
+/* i would much rather store all of the possible skinny messages and their handlers inside of this structure */
+/* then use it has the main body for things */
+struct skinny_message {
+	int method_id;  /* method id */
+	char *data;     /* pointer to where the data should be */
+	int  data_len;  /* total length of the message */
+	char *human;    /* human readable form of what the message is */
+	int (* const message_handler)(void); 
+} skinny_messages[] {
+	{ }
+};
+
 /*****************************
  * Asterisk specific globals *
  *****************************/
@@ -1017,6 +1035,7 @@
 	int fd;
 	char inbuf[SKINNY_MAX_PACKET];
 	char outbuf[SKINNY_MAX_PACKET];
+	struct skinny_req    *req;
 	struct skinny_device *device;
 	struct skinnysession *next;
 } *sessions = NULL;
@@ -3638,6 +3657,7 @@
 		ast_verbose("ourip = %s:%d\n", ast_inet_ntoa(d->ourip), ntohs(us.sin_port));
 	}
 
+	/* why is this needing to be re_allocated ? */
 	if (!(req = req_alloc(sizeof(struct start_media_transmission_message), START_MEDIA_TRANSMISSION_MESSAGE)))
 		return -1;
 
@@ -4251,6 +4271,8 @@
 				return NULL;
 			}
 
+			s->req = req;
+			
 			res = handle_message(req, s);
 			if (res < 0) {
 				destroy_session(s);



More information about the svn-commits mailing list