Compare commits
7 Commits
master
...
releng-0.5
| Author | SHA1 | Date | |
|---|---|---|---|
| 426e4a338f | |||
| 722ee70f3f | |||
| 5a3ebcaf3c | |||
| 2645eb8539 | |||
| 1d1780741a | |||
| bb2db885c0 | |||
| 7fd76b99a8 |
@@ -52,6 +52,8 @@ EXTRA_DIST = \
|
||||
init/bongo.init.fc4.in \
|
||||
init/bongo.init.sles9.in \
|
||||
init/bongo.init.suse10.in \
|
||||
init/bongo.init.debian.in \
|
||||
init/bongo-manager.default.debian \
|
||||
init/bongo.xml.solaris-smf \
|
||||
init/http-bongo.xml.solaris-smf \
|
||||
init/http-bongo.solaris-smf.in \
|
||||
|
||||
+3
-12
@@ -447,18 +447,9 @@ done
|
||||
# remove any flags which tell us not to autogen things
|
||||
#rm -f import/sqlite3/NO-AUTO-GEN
|
||||
|
||||
SVNREV="`svnversion . 2>/dev/null`"
|
||||
if test x$SVNREV = x; then
|
||||
echo Unable to discern build version
|
||||
echo \#define BONGO_BUILD_BRANCH \"unknown\" > ./include/bongo-buildinfo.h
|
||||
echo \#define BONGO_BUILD_VSTR \"\" >> ./include/bongo-buildinfo.h
|
||||
echo \#define BONGO_BUILD_VER \"0\" >> ./include/bongo-buildinfo.h
|
||||
else
|
||||
echo SVN Rev at $SVNREV
|
||||
echo \#define BONGO_BUILD_BRANCH \"trunk\" > ./include/bongo-buildinfo.h
|
||||
echo \#define BONGO_BUILD_VSTR \"r\" >> ./include/bongo-buildinfo.h
|
||||
echo \#define BONGO_BUILD_VER \"$SVNREV\" >> ./include/bongo-buildinfo.h
|
||||
fi
|
||||
echo \#define BONGO_BUILD_BRANCH \"0.5\" > ./include/bongo-buildinfo.h
|
||||
echo \#define BONGO_BUILD_VSTR \"v\" >> ./include/bongo-buildinfo.h
|
||||
echo \#define BONGO_BUILD_VER \"1104\" >> ./include/bongo-buildinfo.h
|
||||
|
||||
conf_flags="--enable-maintainer-mode"
|
||||
|
||||
|
||||
+2
-1
@@ -3,7 +3,7 @@ AC_PREREQ(2.52)
|
||||
|
||||
AC_INIT(src/libs/msgapi/msgapi.c)
|
||||
|
||||
AM_INIT_AUTOMAKE(bongo, 0.1.0)
|
||||
AM_INIT_AUTOMAKE(bongo, 0.5.2)
|
||||
|
||||
# this space is here to trick autogen.sh
|
||||
AM_GNU_GETTEXT([external])
|
||||
@@ -696,6 +696,7 @@ init/bongo.init.fc4
|
||||
init/bongo.init.sles9
|
||||
init/bongo.init.suse10
|
||||
init/bongo.init.rpl
|
||||
init/bongo.init.debian
|
||||
init/bongoinit.conf.rpl
|
||||
init/http-bongo.solaris-smf
|
||||
init/svc-bongo.solaris-smf
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@ typedef struct _MsgSQLHandle {
|
||||
} stmts;
|
||||
|
||||
BongoMemStack *memstack;
|
||||
XplSemaphore *transactionLock;
|
||||
XplSemaphore transactionLock;
|
||||
int transactionDepth;
|
||||
int lockTimeoutMs;
|
||||
BOOL isNew; // have we just created this?
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Defaults for bongoproject initscript
|
||||
# sourced by /etc/init.d/bongo-manager
|
||||
# It should be installed at /etc/default/bongo-manager
|
||||
#
|
||||
# This is a POSIX shell fragment
|
||||
#
|
||||
|
||||
# Additional options that are passed to the Daemon.
|
||||
DAEMON_ARGS="-d -k"
|
||||
@@ -0,0 +1,136 @@
|
||||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: bongo mail-transport-agent
|
||||
# Required-Start: $local_fs $remote_fs $syslog $named $network $time
|
||||
# Required-Stop: $local_fs $remote_fs $syslog $named $network
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Should-Start: slapd
|
||||
# Should-Stop: slapd
|
||||
# Short-Description: Start and stops Bongo
|
||||
# Description: Bongo collaboration system, visit:
|
||||
# http://www.bongo-project.com
|
||||
### END INIT INFO
|
||||
|
||||
#
|
||||
# Author: Igor Morgado <igor@gnutech.inf.br>
|
||||
#
|
||||
|
||||
# set -e
|
||||
|
||||
# Default VARS
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
DESC="Bongo Colaborative Suite"
|
||||
NAME=bongo-manager
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
BONGO_DIR=@prefix@
|
||||
BONGO_BIN=@prefix@/sbin
|
||||
BONGO_PROCLIST="bongomanager bongodmc bongostore bongoqueue bongosmtp bongoimap bongopop3 bongoantispam bongoavirus bongocalagent bongomailprox bongorules bongopluspack bongoconnmgr"
|
||||
PIDFILE="$BONGO_DIR/var/bongo/work/bongomanager.pid"
|
||||
DAEMON=$BONGO_BIN/$NAME
|
||||
DAEMON_ARGS="-d -k"
|
||||
|
||||
# Exit if the package is not installed
|
||||
[ -x "$DAEMON" ] || exit 0
|
||||
|
||||
# Read configuration variable file if it is present
|
||||
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
|
||||
|
||||
# Load the VERBOSE setting and other rcS variables
|
||||
#. /lib/init/vars.sh
|
||||
|
||||
# Define LSB log_* functions.
|
||||
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
function do_start() {
|
||||
# Return
|
||||
# 0 if daemon has been started
|
||||
# 1 if daemon was already running
|
||||
# 2 if daemon could not be started
|
||||
|
||||
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
|
||||
|| return 1
|
||||
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS \
|
||||
|| return 2
|
||||
}
|
||||
|
||||
function do_stop() {
|
||||
# Return
|
||||
# 0 if daemon has been stopped
|
||||
# 1 if daemon was already stopped
|
||||
# 2 if daemon could not be stopped
|
||||
# other if a failure occurred
|
||||
|
||||
start-stop-daemon --verbose --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
|
||||
|
||||
RETVAL="$?"
|
||||
[ "$RETVAL" = 2 ] && return 2
|
||||
|
||||
return "$RETVAL"
|
||||
}
|
||||
|
||||
function do_reload() {
|
||||
#
|
||||
# If the daemon can reload its configuration without
|
||||
# restarting (for example, when it is sent a SIGHUP),
|
||||
# then implement that here.
|
||||
#
|
||||
start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
|
||||
|
||||
do_start
|
||||
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
|
||||
;;
|
||||
|
||||
stop)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
|
||||
restart|force-reload)
|
||||
#
|
||||
# If the "reload" option is implemented then remove the
|
||||
# 'force-reload' alias
|
||||
#
|
||||
log_daemon_msg "Restarting $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1)
|
||||
do_start
|
||||
case "$?" in
|
||||
0) log_end_msg 0 ;;
|
||||
1) log_end_msg 1 ;; # Old process is still running
|
||||
*) log_end_msg 1 ;; # Failed to start
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
# Failed to stop
|
||||
log_end_msg 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -757,10 +757,14 @@ StoreObjectIterQueryBuilder(StoreClient *client, QueryBuilder *builder, BOOL sho
|
||||
}
|
||||
|
||||
|
||||
MemFree(sql);
|
||||
QueryBuilderFinish(builder);
|
||||
return 1000;
|
||||
|
||||
abort:
|
||||
if (sql) {
|
||||
MemFree(sql);
|
||||
}
|
||||
MsgSQLAbortTransaction(client->storedb);
|
||||
QueryBuilderFinish(builder);
|
||||
|
||||
|
||||
@@ -43,11 +43,33 @@ QueryBuilderStart(QueryBuilder *builder)
|
||||
void
|
||||
QueryBuilderFinish(QueryBuilder *builder)
|
||||
{
|
||||
unsigned int x;
|
||||
StorePropInfo *newprop;
|
||||
ExtraLink *link;
|
||||
QueryBuilder_Param *param;
|
||||
|
||||
QueryParserFinish(&builder->internal_parser);
|
||||
QueryParserFinish(&builder->external_parser);
|
||||
|
||||
/* free all the properties */
|
||||
for(x=0;x<BongoArrayCount(builder->properties);x++) {
|
||||
newprop = BongoArrayIndex(builder->properties, StorePropInfo *, x);
|
||||
MemFree(newprop);
|
||||
}
|
||||
BongoArrayFree(builder->properties, TRUE);
|
||||
|
||||
/* free all the links */
|
||||
for(x=0;x<BongoArrayCount(builder->links);x++) {
|
||||
link = BongoArrayIndex(builder->links, ExtraLink *, x);
|
||||
MemFree(link);
|
||||
}
|
||||
BongoArrayFree(builder->links, TRUE);
|
||||
|
||||
/* free all the parameters */
|
||||
for(x=0;x<BongoArrayCount(builder->parameters);x++) {
|
||||
param = BongoArrayIndex(builder->parameters, QueryBuilder_Param *, x);
|
||||
MemFree(param);
|
||||
}
|
||||
BongoArrayFree(builder->parameters, TRUE);
|
||||
}
|
||||
|
||||
@@ -307,6 +329,7 @@ QueryBuilderCreateSQL(QueryBuilder *builder, char **output)
|
||||
{
|
||||
BongoStringBuilder b;
|
||||
unsigned int i;
|
||||
int ccode;
|
||||
|
||||
if (BongoStringBuilderInit(&b)) {
|
||||
// unable to start... ick
|
||||
@@ -359,7 +382,8 @@ QueryBuilderCreateSQL(QueryBuilder *builder, char **output)
|
||||
// add in any constraints specified on the various columns
|
||||
if (builder->int_query) {
|
||||
if (QueryExpressionToSQL(builder, builder->internal_parser.start, &b)) {
|
||||
return -2;
|
||||
ccode = -2;
|
||||
goto abort;
|
||||
}
|
||||
}
|
||||
if (builder->int_query && builder->ext_query) {
|
||||
@@ -367,7 +391,8 @@ QueryBuilderCreateSQL(QueryBuilder *builder, char **output)
|
||||
}
|
||||
if (builder->ext_query) {
|
||||
if (QueryExpressionToSQL(builder, builder->external_parser.start, &b)) {
|
||||
return -3;
|
||||
ccode = -3;
|
||||
goto abort;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -399,6 +424,10 @@ QueryBuilderCreateSQL(QueryBuilder *builder, char **output)
|
||||
BongoStringBuilderDestroy(&b);
|
||||
|
||||
return 0;
|
||||
|
||||
abort:
|
||||
BongoStringBuilderDestroy(&b);
|
||||
return ccode;
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* Parser of Store Protocol queries into structures, for later use in SQL queries
|
||||
*/
|
||||
|
||||
#include "stored.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
@@ -151,7 +152,7 @@ QueryParserRun(struct parser_state *state)
|
||||
char *token;
|
||||
struct expression *current_expression = state->start;
|
||||
|
||||
while (pull_token(&(state->query), &token) != -1) {
|
||||
while (pull_token(&(state->query_ptr), &token) != -1) {
|
||||
if (current_expression < state->start) {
|
||||
// ran off the top of our stack, but there were still tokens
|
||||
DEBUG_MESSAGE("ERR: tokens remaining in data\n");
|
||||
@@ -261,6 +262,8 @@ QueryParserStart(struct parser_state *state, const char *query, int max_expr) {
|
||||
return -2;
|
||||
}
|
||||
|
||||
state->query_ptr = state->query;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -274,6 +277,9 @@ QueryParserFinish(struct parser_state *state) {
|
||||
if (state->start != NULL) {
|
||||
MemFree(state->start);
|
||||
}
|
||||
if (state->query != NULL) {
|
||||
MemFree(state->query);
|
||||
}
|
||||
state->start = state->last = NULL;
|
||||
state->entries = 0;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ struct parser_state {
|
||||
struct expression *last;
|
||||
int entries;
|
||||
char *query;
|
||||
char *query_ptr;
|
||||
};
|
||||
|
||||
int QueryParserStart(struct parser_state *state, const char *query, int max_expr);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE log4c SYSTEM "">
|
||||
|
||||
<log4c version="0.1.0">
|
||||
<log4c version="0.5.2">
|
||||
|
||||
<config>
|
||||
<bufsize>0</bufsize>
|
||||
|
||||
Reference in New Issue
Block a user