[asterisk-commits] oej: branch group/multiparking r104078 - /team/group/multiparking/main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Feb 24 07:56:48 CST 2008


Author: oej
Date: Sun Feb 24 07:56:48 2008
New Revision: 104078

URL: http://svn.digium.com/view/asterisk?view=rev&rev=104078
Log:
Lost changes that Mvanbaak needs

Modified:
    team/group/multiparking/main/features.c

Modified: team/group/multiparking/main/features.c
URL: http://svn.digium.com/view/asterisk/team/group/multiparking/main/features.c?view=diff&rev=104078&r1=104077&r2=104078
==============================================================================
--- team/group/multiparking/main/features.c (original)
+++ team/group/multiparking/main/features.c Sun Feb 24 07:56:48 2008
@@ -136,7 +136,6 @@
 	ASTOBJ_COMPONENTS(struct ast_parkinglot);	/*!< various object stuff, including ->name */
 	char parking_con[AST_MAX_EXTENSION];		/*!< Context for which parking is made accessible */
 	char parking_con_dial[AST_MAX_EXTENSION];	/*!< Context for dialback for parking (KLUDGE) */
-	char parking_ext[AST_MAX_EXTENSION];            /*!< Extension you type to park the call */
 	int parking_start;				/*!< First available extension for parking */
 	int parking_stop;				/*!< Last available extension for parking */
 	int parking_offset;
@@ -152,6 +151,7 @@
 } parkinglots;
  
 struct ast_parkinglot *default_parkinglot;
+char parking_ext[AST_MAX_EXTENSION];            /*!< Extension you type to park the call */
 
 static char courtesytone[256];                             /*!< Courtesy tone */
 static int parkedplay = 0;                                 /*!< Who to play the courtesy tone to */
@@ -474,7 +474,7 @@
 	if (!ast_strlen_zero(parkingexten)) {
 		if (ast_exists_extension(NULL, parkinglot->parking_con, parkingexten, 1, NULL)) {
 			AST_LIST_UNLOCK(&parkinglot->parkings);
-			parkinglot_unref(parkinglot->parkings);
+			parkinglot_unref(parkinglot);
 			ast_free(pu);
 			ast_log(LOG_WARNING, "Requested parking extension already exists: %s@%s\n", parkingexten, parkinglot->parking_con);
 			return 1;	/* Continue execution if possible */
@@ -522,7 +522,7 @@
 	pu->start = ast_tvnow();
 	pu->parkingnum = x;
 	pu->parkinglot = parkinglot;
-	pu->parkingtime = (timeout > 0) ? timeout : parkingtime;
+	pu->parkingtime = (timeout > 0) ? timeout : parkinglot->parkingtime;
 	if (extout)
 		*extout = x;
 
@@ -534,8 +534,7 @@
 	ast_copy_string(pu->context, S_OR(chan->macrocontext, chan->context), sizeof(pu->context));
 	ast_copy_string(pu->exten, S_OR(chan->macroexten, chan->exten), sizeof(pu->exten));
 	pu->priority = chan->macropriority ? chan->macropriority : chan->priority;
-	pu->next = parkinglot->occupiedlots; SKREP
-	parkinglot->occupiedlots = pu;
+	AST_LIST_INSERT_TAIL(&parkinglot->parkings, pu, list);
 
 	/* If parking a channel directly, don't quiet yet get parking running on it */
 	if (peer == chan) 
@@ -2266,6 +2265,7 @@
 	int res = 0;
 
 	parkinglot_addref(curlot);
+SKREP - needs AST LIST TRAVERSAL STUFF!
 	pu = curlot->occupiedlots;
 	while(pu) {
 		struct ast_channel *chan = pu->chan;	/* shorthand */




More information about the asterisk-commits mailing list