[svn-commits] marquis: branch group/pinana-publish-1.4 r296522 - /team/group/pinana-publish...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Nov 28 13:09:33 CST 2010


Author: marquis
Date: Sun Nov 28 13:09:30 2010
New Revision: 296522

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=296522
Log:
Flesh out sip_devicestate_publish a smidge, still need to build the body of the PUBLISH.

Modified:
    team/group/pinana-publish-1.4/channels/chan_sip.c

Modified: team/group/pinana-publish-1.4/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pinana-publish-1.4/channels/chan_sip.c?view=diff&rev=296522&r1=296521&r2=296522
==============================================================================
--- team/group/pinana-publish-1.4/channels/chan_sip.c (original)
+++ team/group/pinana-publish-1.4/channels/chan_sip.c Sun Nov 28 13:09:30 2010
@@ -9919,8 +9919,11 @@
 		char uri[SIPBUFSIZE];
 
 		ast_log(LOG_DEBUG, "*** Creating new publish device for %s\n", sc->dev);
-		snprintf(uri, sizeof(uri), "sip:%s at edvina.net", sc->dev);
-		device = ao2_alloc(sizeof(struct sip_published_device), pubdev_destructor);
+		snprintf(uri, sizeof(uri), "sip:%s@%s", sc->dev, pres_server->domain);
+		if (!device = ao2_alloc(sizeof(struct sip_published_device), pubdev_destructor)) {
+			ast_log(LOG_ERROR, "Cannot allocate sip_published_device!\n");
+			return 0;
+		}
 		ast_copy_string(device->name, sc->dev, sizeof(device->name));
 		ast_copy_string(device->pubname, pres_server->name, sizeof(device->pubname));
 		/* Initiate stuff */
@@ -9929,7 +9932,7 @@
 		publish_type = SIP_PUBLISH_INITIAL;
 		device->epa = ast_calloc(1, sizeof(struct sip_epa_entry));
 		ast_copy_string(device->epa->body, "FNULHAKE\nGNURP", sizeof(device->epa->body));
-		ast_copy_string(device->epa->destination, "jarl.webway.se", sizeof(device->epa->body));
+		ast_copy_string(device->epa->destination, pres_server->host, sizeof(device->epa->destination));
 		device->epa->publish_type = publish_type;
 		ast_copy_string(device->epa->entity_tag, create_new_etag(), sizeof(device->epa->entity_tag));
 		ast_log(LOG_DEBUG, "*** Created new publish device for %s\n", sc->dev);




More information about the svn-commits mailing list