[asterisk-commits] dvossel: branch dvossel/sip_resource_list_trunk r186714 - /team/dvossel/sip_r...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Apr 6 20:15:02 CDT 2009


Author: dvossel
Date: Mon Apr  6 20:14:59 2009
New Revision: 186714

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=186714
Log:
updating for backup.  cleaned up a few comments, deleted some todo notes, left some todo notes.

Modified:
    team/dvossel/sip_resource_list_trunk/channels/chan_sip.c

Modified: team/dvossel/sip_resource_list_trunk/channels/chan_sip.c
URL: http://svn.digium.com/svn-view/asterisk/team/dvossel/sip_resource_list_trunk/channels/chan_sip.c?view=diff&rev=186714&r1=186713&r2=186714
==============================================================================
--- team/dvossel/sip_resource_list_trunk/channels/chan_sip.c (original)
+++ team/dvossel/sip_resource_list_trunk/channels/chan_sip.c Mon Apr  6 20:14:59 2009
@@ -4663,6 +4663,23 @@
 	return CMP_MATCH | CMP_STOP;
 }
 
+/*static int print_rlists(void) // todohere remove
+{
+	struct sip_rlist *rlist;
+	struct sip_rlist_resource *resource;
+	struct ao2_iterator it;
+
+	it = ao2_iterator_init(rlists, 0);
+	while ((rlist = ao2_iterator_next(&it))) {
+		ast_log(LOG_NOTICE,"RESOURCE LIST: %s CONTEXT: %s the_MARK:%d\n", rlist->name, rlist->context, rlist->the_mark);
+		AST_LIST_TRAVERSE(&rlist->resources, resource, entry) {
+			ast_log(LOG_NOTICE, "\tMONITOR EXTEN: %s\n", resource->exten);
+		}
+		ao2_t_ref(rlist, -1, "print_rlist");
+	}
+	return 0;
+}*/
+
 /*!
  * \brief Locate resource list by name and context
  *
@@ -4678,7 +4695,7 @@
 
 	rlist = ao2_t_find(rlists, &tmp_rlist, OBJ_POINTER, "ao2_find in rlist_find()");
 
-	if (rlist) {
+	if (rlist) { //todohere make sure it matches context as well
 		found = 1;
 		if (p) {
 			p->rlist = rlist;
@@ -4687,6 +4704,8 @@
 		}
 	}
 
+	ast_log(LOG_NOTICE, "RLIST_FIND result:%d\n", found); //todohere remove
+//	print_rlists(); //todohere remove
 	return found;
 }
 
@@ -20933,16 +20952,16 @@
 		return 0;
 	}
 
-	if (strcmp(event, "message-summary")) { //todohere get explanation
+	if (strcmp(event, "message-summary")) {
 		/* Get destination right away */
-		gotdest = get_destination(p, NULL); // todohere get dest of list not hint.  err i dunno but we'll get this far as it is now
+		gotdest = get_destination(p, NULL);
 	}
 
 	/* Get full contact header - this needs to be used as a request URI in NOTIFY's */
 	parse_ok_contact(p, req);
 
 	build_contact(p);
-	if (gotdest) { // todohere will return 404 right now for rlist
+	if (gotdest) {
 		transmit_response(p, "404 Not Found", req);
 		pvt_set_needdestroy(p, "subscription target not found");
 		if (authpeer)
@@ -21051,7 +21070,7 @@
 	if (p->subscribed != MWI_NOTIFICATION && !resubscribe) {
 
 		if (p->subscribed == DIALOG_RLMI_XML) {
-//todohere add code to add this pvt to subscribe to rlist updates 
+			//todohere add code to add this pvt to subscribe to rlist updates 
 			if (p->rlist) {
 				rlist_remove_watcher(p);
 			}
@@ -21096,6 +21115,8 @@
 				sip_send_mwi_to_peer(p->relatedpeer, NULL, 0);
 				ao2_unlock(p->relatedpeer);
 			}
+		} else if (p->subscribed == DIALOG_RLMI_XML) { /* resource lists extension states are handled differently */
+			//todohere add logic for resource lists, send 200ok, first notifiy, etc..
 		} else {
 			struct sip_pvt *p_old;
 
@@ -23288,22 +23309,6 @@
 
 	return 0;
 }
-
-/*static void print_rlist() // todohere remove
-{
-	struct sip_rlist *rlist;
-	struct sip_rlist_resource *resource;
-	struct ao2_iterator it;
-
-	it = ao2_iterator_init(rlists, 0);
-	while ((rlist = ao2_iterator_next(&it))) {
-		ast_log(LOG_NOTICE,"RESOURCE LIST: %s CONTEXT: %s the_MARK:%d\n", rlist->name, rlist->context, rlist->the_mark);
-		AST_LIST_TRAVERSE(&rlist->resources, resource, entry) {
-			ast_log(LOG_NOTICE, "\tMONITOR EXTEN: %s\n", resource->exten);
-		}
-		ao2_t_ref(rlist, -1, "print_rlist");
-	}
-} */
 
 static struct sip_rlist *build_rlist(const char *name, struct ast_variable *v, struct ast_variable *alt, int realtime)
 {




More information about the asterisk-commits mailing list