Skip to content

Commit 1d712c1

Browse files
authored
Merge pull request #3275 from lemenkov/guard_versiontype
Ensure VERSIONTYPE is always defined
2 parents aae8b39 + 22ef73e commit 1d712c1

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

Makefile.defs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,8 @@ else
507507
VERSIONTYPE = $(shell [ -f "${TOP_SRCDIR}/.gitrevision" ] && echo "git")
508508
ifneq ($(VERSIONTYPE),)
509509
THISREVISION = $(shell cat ${TOP_SRCDIR}/.gitrevision)
510+
else
511+
VERSIONTYPE = unknown
510512
endif
511513
OLDREVISION = "$(THISREVISION)"
512514
endif

main.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,7 @@ static void print_ct_constants(void)
192192
MAX_RECV_BUFFER_SIZE, MAX_LISTEN, MAX_URI_SIZE,
193193
BUF_SIZE );
194194
printf("poll method support: %s.\n", poll_support);
195-
#ifdef VERSIONTYPE
196195
printf("%s revision: %s\n", core_scm_ver.type, core_scm_ver.rev);
197-
#endif
198196
}
199197

200198
static int

mi/mi_core.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,11 @@ static mi_response_t *mi_version_1(const mi_params_t *params,
138138
return 0;
139139
}
140140

141-
#ifdef VERSIONTYPE
142141
if (add_mi_string(resp_obj, MI_SSTR(VERSIONTYPE), MI_SSTR(THISREVISION))<0) {
143142
LM_ERR("failed to add mi item\n");
144143
free_mi_response(resp);
145144
return 0;
146145
}
147-
#endif
148146

149147
return resp;
150148
}

0 commit comments

Comments
 (0)