[Asterisk-cvs] asterisk/res res_osp.c,1.5,1.6
markster at lists.digium.com
markster at lists.digium.com
Wed Jun 30 13:11:00 CDT 2004
- Previous message: [Asterisk-cvs] asterisk acl.c,1.26,1.27 manager.c,1.60,1.61 rtp.c,1.77,1.78
- Next message: [Asterisk-cvs] asterisk/channels chan_h323.c,1.64,1.65 chan_iax.c,1.62,1.63 chan_iax2.c,1.165,1.166 chan_mgcp.c,1.57,1.58 chan_sip.c,1.435,1.436 chan_skinny.c,1.49,1.50 iax2-parser.c,1.23,1.24
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /usr/cvsroot/asterisk/res
In directory mongoose.digium.com:/tmp/cvs-serv25596/res
Modified Files:
res_osp.c
Log Message:
Use INET_ADDRLEN (bug #1956) (from airport!)
Index: res_osp.c
===================================================================
RCS file: /usr/cvsroot/asterisk/res/res_osp.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- res_osp.c 29 Jun 2004 13:52:03 -0000 1.5
+++ res_osp.c 30 Jun 2004 16:56:51 -0000 1.6
@@ -423,7 +423,7 @@
int ast_osp_validate(char *provider, char *token, int *handle, unsigned int *timelimit, char *callerid, struct in_addr addr, char *extension)
{
char tmp[256]="", *l, *n;
- char ip[256];
+ char iabuf[INET_ADDRSTRLEN];
char source[OSP_MAX]; /* Same length as osp->source */
char *token2;
int tokenlen;
@@ -452,7 +452,7 @@
}
callerid = l;
ast_mutex_lock(&osplock);
- ast_inet_ntoa(ip, sizeof(ip), addr);
+ ast_inet_ntoa(iabuf, sizeof(iabuf), addr);
osp = providers;
while(osp) {
if (!strcasecmp(osp->name, provider)) {
@@ -470,10 +470,10 @@
if (res) {
res = 0;
dummy = 0;
- if (!OSPPTransactionValidateAuthorisation(*handle, ip, source, NULL, NULL,
+ if (!OSPPTransactionValidateAuthorisation(*handle, iabuf, source, NULL, NULL,
callerid, OSPC_E164, extension, OSPC_E164, 0, "", tokenlen, token2, &authorised, timelimit, &dummy, NULL, TOKEN_ALGO_BOTH)) {
if (authorised) {
- ast_log(LOG_DEBUG, "Validated token for '%s' from '%s@%s'\n", extension, callerid, ip);
+ ast_log(LOG_DEBUG, "Validated token for '%s' from '%s@%s'\n", extension, callerid, iabuf);
res = 1;
}
}
- Previous message: [Asterisk-cvs] asterisk acl.c,1.26,1.27 manager.c,1.60,1.61 rtp.c,1.77,1.78
- Next message: [Asterisk-cvs] asterisk/channels chan_h323.c,1.64,1.65 chan_iax.c,1.62,1.63 chan_iax2.c,1.165,1.166 chan_mgcp.c,1.57,1.58 chan_sip.c,1.435,1.436 chan_skinny.c,1.49,1.50 iax2-parser.c,1.23,1.24
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the svn-commits
mailing list