Fixed the format of the git revision.
Removed the product title.
This commit is contained in:
parent
0b59941102
commit
9c49f07826
@ -1,6 +1,6 @@
|
||||
##
|
||||
## Makefile for uhub (Use GNU make)
|
||||
## Copyright (C) 2007-2008, Jan Vidar Krey <janvidar@extatic.org>
|
||||
## Copyright (C) 2007-2009, Jan Vidar Krey <janvidar@extatic.org>
|
||||
#
|
||||
|
||||
CC = gcc
|
||||
@ -61,13 +61,9 @@ else
|
||||
MSG_CLEAN="Clean as a whistle"
|
||||
endif
|
||||
|
||||
|
||||
|
||||
|
||||
CFLAGS += -I/source/libevent
|
||||
LDFLAGS += -L/source/libevent
|
||||
|
||||
-include release_setup.mk
|
||||
ifeq ($(RELEASE),YES)
|
||||
CFLAGS += -Os -DNDEBUG
|
||||
GIT_REVISION ?= NO
|
||||
@ -131,7 +127,7 @@ LDFLAGS += -L$(LIBEVENT_PATH)
|
||||
endif
|
||||
|
||||
ifeq ($(GIT_REVISION),YES)
|
||||
CFLAGS += -DGIT_REVISION=\"-git:$(shell git show --abbrev-commit | head -n 1 | cut -f 2 -d " ")\"
|
||||
CFLAGS += -DGIT_REVISION=\"$(shell git show --abbrev-commit | head -n 1 | cut -f 2 -d " ")\"
|
||||
endif
|
||||
|
||||
# Sources
|
||||
@ -274,5 +270,4 @@ clean:
|
||||
@rm -rf $(libuhub_OBJECTS) $(PCH) *~ core $(uhub_BINARY) $(LIBUHUB) $(all_OBJECTS) && \
|
||||
echo $(MSG_CLEAN)
|
||||
|
||||
-include release_targets.mk
|
||||
|
||||
|
14
src/hub.c
14
src/hub.c
@ -555,14 +555,14 @@ void hub_set_variables(struct hub_info* hub, struct acl_handle* acl)
|
||||
int fd, ret;
|
||||
char buf[MAX_RECV_BUF];
|
||||
char* tmp;
|
||||
|
||||
char* server = adc_msg_escape(SERVER); /* FIXME: OOM */
|
||||
|
||||
hub->acl = acl;
|
||||
hub->command_info = adc_msg_construct(ADC_CMD_IINF, 15 + strlen(SERVER));
|
||||
hub->command_info = adc_msg_construct(ADC_CMD_IINF, 15 + strlen(server));
|
||||
if (hub->command_info)
|
||||
{
|
||||
adc_msg_add_named_argument(hub->command_info, ADC_INF_FLAG_CLIENT_TYPE, ADC_CLIENT_TYPE_HUB);
|
||||
adc_msg_add_named_argument(hub->command_info, ADC_INF_FLAG_USER_AGENT, SERVER);
|
||||
adc_msg_add_named_argument(hub->command_info, ADC_INF_FLAG_USER_AGENT, server);
|
||||
|
||||
tmp = adc_msg_escape(hub->config->hub_name);
|
||||
adc_msg_add_named_argument(hub->command_info, ADC_INF_FLAG_NICK, tmp);
|
||||
@ -600,13 +600,17 @@ void hub_set_variables(struct hub_info* hub, struct acl_handle* acl)
|
||||
adc_msg_add_argument(hub->command_support, ADC_PROTO_SUPPORT);
|
||||
}
|
||||
|
||||
hub->command_banner = adc_msg_construct(ADC_CMD_ISTA, 25 + strlen(SERVER));
|
||||
hub->command_banner = adc_msg_construct(ADC_CMD_ISTA, 25 + strlen(server));
|
||||
if (hub->command_banner)
|
||||
{
|
||||
adc_msg_add_argument(hub->command_banner, "000 Powered\\sby\\s" SERVER);
|
||||
tmp = adc_msg_escape("Powered by " SERVER);
|
||||
adc_msg_add_argument(hub->command_banner, "000");
|
||||
adc_msg_add_argument(hub->command_banner, tmp);
|
||||
hub_free(tmp);
|
||||
}
|
||||
|
||||
hub->status = (hub->config->hub_enabled ? hub_status_running : hub_status_disabled);
|
||||
hub_free(server);
|
||||
}
|
||||
|
||||
|
||||
|
@ -191,7 +191,7 @@ int check_configuration(int dump)
|
||||
|
||||
void print_version()
|
||||
{
|
||||
fprintf(stdout, "" PRODUCT " " VERSION " " PRODUCT_TITLE "\n");
|
||||
fprintf(stdout, "" PRODUCT " " VERSION "\n");
|
||||
fprintf(stdout, "Copyright (C) 2007-2009, Jan Vidar Krey <janvidar@extatic.org>\n"
|
||||
"This is free software with ABSOLUTELY NO WARRANTY.\n\n");
|
||||
exit(0);
|
||||
|
10
version.h
10
version.h
@ -2,16 +2,14 @@
|
||||
#define PRODUCT "uHub"
|
||||
#endif
|
||||
|
||||
#ifndef PRODUCT_TITLE
|
||||
#define PRODUCT_TITLE "(micro-Hub)"
|
||||
#endif
|
||||
|
||||
#ifndef GIT_REVISION
|
||||
#define GIT_REVISION ""
|
||||
#define REVISION ""
|
||||
#else
|
||||
#define REVISION " (git: " GIT_REVISION ")"
|
||||
#endif
|
||||
|
||||
#ifndef VERSION
|
||||
#define VERSION "0.3.0-rc2" GIT_REVISION
|
||||
#define VERSION "0.3.0-rc2" REVISION
|
||||
#endif
|
||||
|
||||
#ifndef COPYRIGHT
|
||||
|
Loading…
Reference in New Issue
Block a user