fixed compiler warning in plugin_fix_bogus_via.c
This commit is contained in:
@@ -154,8 +154,8 @@ static int sip_patch_topvia(sip_ticket_t *ticket) {
|
||||
|
||||
/* set new port number */
|
||||
osip_free(via->port);
|
||||
via->port=osip_malloc(6); /* 5 digits + \0 */
|
||||
snprintf(via->port, 5, "%u", ntohs(ticket->from.sin_port));
|
||||
via->port=osip_malloc(PORTSTRING_SIZE); /* 5 digits + \0 */
|
||||
snprintf(via->port, PORTSTRING_SIZE, "%u", ntohs(ticket->from.sin_port));
|
||||
via->port[5-1] ='\0';
|
||||
|
||||
DEBUGC(DBCLASS_PLUGIN, "plugin_fix_bogus_via: -> %s:%s",
|
||||
|
||||
+2
-1
@@ -309,7 +309,8 @@ int unload_plugins(void);
|
||||
#define HOSTNAME_SIZE 128 /* max string length of a hostname */
|
||||
#define USERNAME_SIZE 128 /* max string length of a username (auth) */
|
||||
#define PASSWORD_SIZE 128 /* max string length of a password (auth) */
|
||||
#define IPSTRING_SIZE 16 /* stringsize of IP address xxx.xxx.xxx.xxx */
|
||||
#define IPSTRING_SIZE 16 /* stringsize of IP address xxx.xxx.xxx.xxx\0 */
|
||||
#define PORTSTRING_SIZE 6 /* stringsize of port number xxxxx\0 */
|
||||
#define VIA_BRANCH_SIZE 128 /* max string length for via branch param */
|
||||
/* scratch buffer for gethostbyname_r() */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user