[asterisk-commits] eliel: branch group/per_member_wrapuptime r197023 - /team/group/per_member_wr...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 27 08:50:42 CDT 2009


Author: eliel
Date: Wed May 27 08:50:36 2009
New Revision: 197023

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=197023
Log:
Rename current_wrapuptime to next_wrapuptime and make it compile again.

Modified:
    team/group/per_member_wrapuptime/apps/app_queue.c

Modified: team/group/per_member_wrapuptime/apps/app_queue.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/per_member_wrapuptime/apps/app_queue.c?view=diff&rev=197023&r1=197022&r2=197023
==============================================================================
--- team/group/per_member_wrapuptime/apps/app_queue.c (original)
+++ team/group/per_member_wrapuptime/apps/app_queue.c Wed May 27 08:50:36 2009
@@ -681,7 +681,7 @@
 	int status;                         /*!< Status of queue member */
 	int paused;                         /*!< Are we paused (not accepting calls)? */
 	int wrapuptime;			    /*!< Member wrapuptime. */
-	int current_wrapuptime;             /*!< This wrapuptime can be modified just for the next call. */
+	int next_wrapuptime;		    /*!< This wrapuptime can be modified just for the next call. */
 	time_t lastcall;                    /*!< When last successful call was hungup */
 	struct call_queue *lastqueue;	    /*!< Last queue we received a call */
 	unsigned int dead:1;                /*!< Used to detect members deleted in realtime */
@@ -1113,7 +1113,7 @@
 		cur->penalty = penalty;
 		cur->paused = paused;
 		cur->wrapuptime = wrapuptime;
-		cur->current_wrapuptime = wrapuptime;
+		cur->next_wrapuptime = wrapuptime;
 		ast_copy_string(cur->interface, interface, sizeof(cur->interface));
 		if (!ast_strlen_zero(state_interface))
 			ast_copy_string(cur->state_interface, state_interface, sizeof(cur->state_interface));
@@ -2499,10 +2499,10 @@
 	lastqueue = tmp->lastqueue;
 
 	/* check if the wrapuptime expired so we are able to call this member. */
-	if (mem->current_wrapuptime >= 0) {
+	if (mem->next_wrapuptime >= 0) {
 		/* the queue member has a wrapuptime configured and didn't expired yet. */
-		wrapup_notexpired = wrapuptime_notexpired(tmp->lastcall, mem->current_wrapuptime);
-	} else if (mem->current_wrapuptime < 0) {
+		wrapup_notexpired = wrapuptime_notexpired(tmp->lastcall, mem->next_wrapuptime);
+	} else if (mem->next_wrapuptime < 0) {
 		/* the member doesn't have a specific wrapuptime configured. */
 		if (lastqueue && lastqueue->wrapuptime) {
 			/* if the queue member doesn't have a wrapuptime configured, check for the wrapuptime of the last queue
@@ -3004,7 +3004,7 @@
 						}
 					}
 					peer = o;
-					o->member->current_wrapuptime = o->member->wrapuptime;
+					o->member->next_wrapuptime = o->member->wrapuptime;
 				}
 			} else if (o->chan && (o->chan == winner)) {
 
@@ -3105,7 +3105,7 @@
 									}
 								}
 								peer = o;
-								o->member->current_wrapuptime = o->member->wrapuptime;
+								o->member->next_wrapuptime = o->member->wrapuptime;
 							}
 							break;
 						case AST_CONTROL_BUSY:
@@ -3912,7 +3912,7 @@
 		tmp->oldstatus = cur->status;
 		tmp->lastcall = cur->lastcall;
 		tmp->lastqueue = cur->lastqueue;
-		tmp->wrapuptime = cur->current_wrapuptime;
+		tmp->wrapuptime = cur->next_wrapuptime;
 		tmp->update_connectedline = 1;
 		ast_copy_string(tmp->interface, cur->interface, sizeof(tmp->interface));
 		/* Special case: If we ring everyone, go ahead and ring them, otherwise
@@ -4502,9 +4502,9 @@
 				foundinterface++;
 				/* this wrapuptime will be used only for the next call to this agent. */
 				if (absolute_value) {
-					mem->current_wrapuptime = offset;
+					mem->next_wrapuptime = offset;
 				} else {
-					mem->current_wrapuptime += offset;
+					mem->next_wrapuptime += offset;
 				}
 				/* modify static configuration. */
 				if (modify_defaults) {
@@ -4524,12 +4524,12 @@
 							"Wrapuptime: %d\r\n",
 							q->name, mem->interface, mem->wrapuptime);
 				} else {
-					ast_queue_log(q->name, "NONE", interface, "NEXTWRAPUPTIME", "%d", mem->current_wrapuptime);
+					ast_queue_log(q->name, "NONE", interface, "NEXTWRAPUPTIME", "%d", mem->next_wrapuptime);
 					manager_event(EVENT_FLAG_AGENT, "QueueMemberNextWrapuptime",
 							"Queue: %s\r\n"
 							"Interface: %s\r\n"
 							"Wrapuptime: %d\r\n",
-							q->name, mem->interface, mem->current_wrapuptime);
+							q->name, mem->interface, mem->next_wrapuptime);
 
 				}
 				ao2_ref(mem, -1);
@@ -6377,7 +6377,7 @@
 					mem->paused ? " (paused)" : "",
 					ast_devstate2str(mem->status));
 				if (mem->wrapuptime >= 0) {
-					ast_str_append(&out, 0, " (wrapuptime = %d/%d)", mem->wrapuptime, mem->current_wrapuptime);
+					ast_str_append(&out, 0, " (wrapuptime = %d/%d)", mem->wrapuptime, mem->next_wrapuptime);
 				}
 				if (mem->calls)
 					ast_str_append(&out, 0, " has taken %d calls (last was %ld secs ago) ",
@@ -7275,7 +7275,7 @@
 /*! \brief Implement autocomplete for CLI command 'queue set wrapuptime' */
 static char *complete_queue_set_member_wrapuptime(const char *line, const char *word, int pos, int state)
 {
-	static char *opts[] = { "in", NULL };
+	static const char * const opts[] = { "in", NULL };
 
 	/* 0 - queue; 1 - set; 2 - wrapuptime; 3 - <wrapuptime>; 4 - on; 5 - <member>; 6 - in; 7 - <queue> */
 	switch (pos) {
@@ -7300,7 +7300,8 @@
 /*! \brief Handle CLI command 'queue set wrapuptime'. */
 static char *handle_queue_set_member_wrapuptime(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
-	char *queuename = NULL, *interface, *ret;
+	const char *queuename = NULL, *interface;
+	char *ret;
 	int wrapuptime, absolute = 1;
 
 	switch (cmd) {




More information about the asterisk-commits mailing list