[srvx-commits] CVS: services/src helpserv.c,1.14.2.7,1.14.2.8
Brought to you by:
entrope
|
From: Adrian D. <sai...@us...> - 2002-10-09 00:41:13
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv18122
Modified Files:
Tag: rel-1_1-branch
helpserv.c
Log Message:
Fix a bug reading in helpserv requests that are assigned to a helper
Index: helpserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/helpserv.c,v
retrieving revision 1.14.2.7
retrieving revision 1.14.2.8
diff -C2 -r1.14.2.7 -r1.14.2.8
*** helpserv.c 8 Oct 2002 21:45:53 -0000 1.14.2.7
--- helpserv.c 8 Oct 2002 22:34:53 -0000 1.14.2.8
***************
*** 1353,1357 ****
for (it=dict_first(hs->requests), line=0; it; it=iter_next(it)) {
! char opentime[INTERVALLEN], reqid[12], username[NICKLEN+1];
req = iter_data(it);
--- 1353,1357 ----
for (it=dict_first(hs->requests), line=0; it; it=iter_next(it)) {
! char opentime[INTERVALLEN], reqid[12], username[NICKLEN+2];
req = iter_data(it);
***************
*** 2710,2725 ****
str = database_get_data(rd->d.object, KEY_REQUEST_HANDLE, RECDB_QSTRING);
! if (str) {
! if (!(request->handle = get_handle_info(str))) {
! log(HS_LOG, LOG_ERROR, "Request %s:%s has an invalid or nonexistant account.\n", hs->helpserv->nick, key);
! free(request);
! return 0;
! }
! if (!(request->parent_hand_list = dict_find(helpserv_reqs_byhand_dict, request->handle->handle, NULL))) {
! request->parent_hand_list = helpserv_reqlist_alloc();
! dict_insert(helpserv_reqs_byhand_dict, request->handle->handle, request->parent_hand_list);
! }
! helpserv_reqlist_append(request->parent_hand_list, request);
}
str = database_get_data(rd->d.object, KEY_REQUEST_OPENED, RECDB_QSTRING);
if (!str) {
--- 2710,2724 ----
str = database_get_data(rd->d.object, KEY_REQUEST_HANDLE, RECDB_QSTRING);
! if (!str || !(request->handle = get_handle_info(str))) {
! log(HS_LOG, LOG_ERROR, "Request %s:%s has an invalid or nonexistant account.\n", hs->helpserv->nick, key);
! free(request);
! return 0;
! }
! if (!(request->parent_hand_list = dict_find(helpserv_reqs_byhand_dict, request->handle->handle, NULL))) {
! request->parent_hand_list = helpserv_reqlist_alloc();
! dict_insert(helpserv_reqs_byhand_dict, request->handle->handle, request->parent_hand_list);
}
+ helpserv_reqlist_append(request->parent_hand_list, request);
+
str = database_get_data(rd->d.object, KEY_REQUEST_OPENED, RECDB_QSTRING);
if (!str) {
|