mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	make datastore creation and destruction a generic API since it is not really channel related, and add the ability to add/find/remove datastores to manager sessions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@135680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -3120,7 +3120,7 @@ static void queue_transfer_fixup(void *data, struct ast_channel *old_chan, struc | ||||
| 	} | ||||
|  | ||||
| 	ast_channel_datastore_remove(new_chan, datastore); | ||||
| 	ast_channel_datastore_free(datastore); | ||||
| 	ast_datastore_free(datastore); | ||||
| } | ||||
|  | ||||
| /*! \brief mechanism to tell if a queue caller was atxferred by a queue member. | ||||
| @@ -3147,7 +3147,7 @@ static void setup_transfer_datastore(struct queue_ent *qe, struct member *member | ||||
| 	} | ||||
|  | ||||
| 	ast_channel_lock(qe->chan); | ||||
| 	if (!(ds = ast_channel_datastore_alloc(&queue_transfer_info, NULL))) { | ||||
| 	if (!(ds = ast_datastore_alloc(&queue_transfer_info, NULL))) { | ||||
| 		ast_channel_unlock(qe->chan); | ||||
| 		ast_log(LOG_WARNING, "Unable to create transfer datastore. queue_log will not show attended transfer\n"); | ||||
| 		return; | ||||
| @@ -3321,7 +3321,7 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce | ||||
| 			goto out; | ||||
| 		} | ||||
| 		if (!datastore) { | ||||
| 			if (!(datastore = ast_channel_datastore_alloc(&dialed_interface_info, NULL))) { | ||||
| 			if (!(datastore = ast_datastore_alloc(&dialed_interface_info, NULL))) { | ||||
| 				ao2_ref(cur, -1); | ||||
| 				ao2_unlock(qe->parent); | ||||
| 				if (use_weight) | ||||
| @@ -3423,7 +3423,7 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce | ||||
| 	 * datastore again, causing a crash | ||||
| 	 */ | ||||
| 	if (datastore && !ast_channel_datastore_remove(qe->chan, datastore)) { | ||||
| 		ast_channel_datastore_free(datastore); | ||||
| 		ast_datastore_free(datastore); | ||||
| 	} | ||||
| 	ao2_lock(qe->parent); | ||||
| 	if (qe->parent->strategy == QUEUE_STRATEGY_RRMEMORY) { | ||||
| @@ -3845,7 +3845,7 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce | ||||
| 			transfer_ds = ast_channel_datastore_find(qe->chan, &queue_transfer_info, NULL); | ||||
| 			if (transfer_ds) { | ||||
| 				ast_channel_datastore_remove(qe->chan, transfer_ds); | ||||
| 				ast_channel_datastore_free(transfer_ds); | ||||
| 				ast_datastore_free(transfer_ds); | ||||
| 			} | ||||
| 			ast_channel_unlock(qe->chan); | ||||
| 		} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user